SlideShare a Scribd company logo
Image Compression
Preview
 Methods of compressing data prior to storage and / or
transmission are of significant practical and commercial
 Image compression addresses the problem of reducing
the amount of data required to a digital image .
 The underlying basis of the reduction process is the
removal of redundant data .
Fundamentals
 The data compression refers to the process of reducing
the amount of data required to represent a given quantity
of information .
 The difference of data and information .
 Data are the means by which information is conveyed .
 Data redundancy is a central issue in digital image
compression
Fundamentals
 The relative data redundancy RD :
Where CR is compression ratio .
n1 , n2 donate the number of information – carrying units in two data set
that represent the same information .
n1=n2 CR =1 RD =0 n1 contains no redundant data
n2 << n1 CR  ∞ RD 1 significant compress & High redundant data
n2 >> n1 CR 0 RD -∞ n2 contains much more data than n1
undesirable case
CR=10 every 10 information in n1 represented by 1 bit in n2 , n1 has 90% redundancy
1
1 R
D C
R  
1
2
n
R n
C 
3 basic Data redundancies
 Coding Redundancy .
 Spatial and Temporal Redundancy.
 i.e. Video sequence (Correlated pixels are not repeated.)
 Irrelevant Information.
 Information that ignored by human visual system
Coding Redundancy
 Lets assume , that a discrete random variable rK in the
interval [0 , 1] represents the gray levels of an image and
each rK occurs with probability
k=0,1,2,……L-1
Where L is the number gray levels ,
nK is the number of times that the Kth gray level appears in
image .
n is the total number of pixel in the image .
( ) K
n
r K n
P r 
( )
r K
P r
Coding Redundancy
The average length of the code words assigned to the
various gray level values
where l(rk) no.of bits used to represent each gray
pr(rk) probability that gray level occurs
1
0
( ) ( )
L
avg K r K
K
L l r p r


 
)
(
)
( K
r
K
avg r
p
r
l
L 

.
7
.
2
)
02
.
0
(
6
)
03
.
0
(
6
)
06
.
0
(
5
)
08
.
0
(
4
)
16
.
0
(
3
)
21
.
0
(
2
)
25
.
0
(
2
)
19
.
0
(
2
bits









Example
Example
 The resulting compression ratio is 3/2.7 or 1.11 .
 Thus approximately 10% of the data resulting from
the use of code 1 is redundant .
 The exact level of redundancy can be determine
from
R
C
099
.
0
11
.
1
1
1 


D
R
Spatial and Temporal redundancy
 Each line has the same intensity
 All 256intensity are of equal probability.
 Pixels intensity are independent of each other
 Pixels are correlated vertically
 Pixels intensity can be predicted from their
 Neighbor intensities, so the information carried
 By one pixel is small.
Histogram
Irrelevant Information
 Information that ignored by HVS are obvious candidates
for omission.
 Original size is 256X256X8
 All are seems to be of the same color
 Compression =256X256X8/8
 = 65536:1
Irrelevant Information
 this type of redundancy is different
from the other 2 types
 Its elimination is possible because the
information itself is not essential for
HVS.
 Its removal referred to Quantization
 This means mapping of a broad range
of intensity into limited range
 Quantization is irreversible operation.
Equalized Histogram
How do we measure information?
 What is the information content of a
message/image?
 What is the minimum amount of data that is
sufficient to describe completely an image
without loss of information?
Modeling Information
Information generation is assumed to be a
probabilistic process.
Idea: associate information with probability!
Note: I(E)=0 when P(E)=1 The event always occurs
A random event E with probability P(E) contains:
How much information does a pixel contain?
Suppose that gray level values are
generated by a random variable, then rk
contains:
units of information!

Average information content of an image:
units/pixel
1
0
( )Pr( )
L
k k
k
E I r r


 
using
How much information does an image contain?
(assumes statistically independent random events)
Entropy
It is not possible to code an image with fewer than H bits/pixel
Example:
 H = -[.25 log2 0.25 +.47 log2 0.47 +
 .25 log2 0.25 + .03 log2 0.03]
 = [-0.25(-2) +.47(-1.09) + .25(-2) +.03(-5.06)]
 = 1.6614 bits/pixel
 What about H for the second type of redundancy?
Fidelity Criteria
 Objective fidelity criterion
Loss of information – compress – decompress .
 Subjective fidelity criteria
Quality of image .
Fidelity criteria
 Irrelevant information represents a loss, so we need a mean of
quantifying the nature of loss
 When the level of information loss can be expressed as a function of
the original or input image and the compressed and decompressed
output image , it is based on an objective fidelity criterion .
 Example : the error at any x,y
 The total error
 






1
0
1
0
)
,
(
)
,
(
ˆ
M
x
N
y
y
x
f
y
x
f
)
,
(
)
,
(
ˆ
)
,
( y
x
f
y
x
f
y
x
e 

Approximate Original
 The square root
 The mean square signal – to – noise
 
2
1
0
1
0
1
0
1
0
2
)
,
(
)
,
(
ˆ
)
,
(
ˆ
  










M
x
N
y
M
x
N
y
rms
y
x
f
y
x
f
y
x
f
SNR
 
2
1
2
1
0
1
0
)
,
(
)
,
(
ˆ
1








  





M
x
N
y
y
x
f
y
x
f
MN
rms
e
Fidelity Criteria(Subjective)
Huffman Coding (coding redundancy)
 A variable-length coding technique.
 Optimal code (i.e., minimizes the number of
code symbols per source symbol).
 Assumption: symbols are encoded one at a
time!
Huffman Coding (cont’d)
• Forward Pass
1. Sort probabilities per symbol
2. Combine the lowest two probabilities
3. Repeat Step2 until only two probabilities remain.
Huffman Coding (cont’d)
 Backward Pass
Assign code symbols going backwards
Huffman Coding (cont’d)
 Lavg using Huffman coding:
 Lavg assuming binary codes:
Huffman Coding/Decoding

After the code has been created,
coding/decoding can be implemented using a
look-up table.

Note that decoding is done unambiguously.
Arithmetic (or Range) Coding
(coding redundancy)
 Instead of encoding source symbols one
at a time, sequences of source symbols
are encoded together.
 There is no one-to-one correspondence
between source symbols and code words.
 Slower than Huffman coding but
typically achieves better compression.
Arithmetic Coding (cont.)
 A sequence of source symbols is
assigned to a sub-interval in [0,1) which
corresponds to an arithmetic code, e.g.,
 We start with the interval [0, 1) ; as the
number of symbols in the message
increases, the interval used to represent
the message becomes smaller.
arithmetic code
Arithmetic Coding (cont.)
Encode message: α1 α2 α3 α3 α4
0 1
1) Start with interval [0, 1)
2) Subdivide [0, 1) based on the probabilities of αi
3) Update interval by processing source symbols
Example
Example (cont.)
▪ The message is encoded using 3 decimal digits or 3/5 =
0.6 decimal digits per source symbol.
▪ The entropy of this message is:
Note: finite precision arithmetic might cause problems due to truncations!
α1 α2 α3 α3 α4
-(3 x 0.2log10(0.2)+0.4log10(0.4))=0.5786 digits/symbol
Arithmetic Decoding

More Related Content

Similar to Lec_8_Image Compression.pdf

Image compression .
Image compression .Image compression .
Image compression .
Payal Vishwakarma
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptx
ssuserd546c51
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
Joel P
 
Compression ii
Compression iiCompression ii
Compression ii
Chandra Mohan Negi
 
Compression Ii
Compression IiCompression Ii
Compression Ii
anithabalaprabhu
 
Compression Ii
Compression IiCompression Ii
Compression Ii
anithabalaprabhu
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
HarisMasood20
 
Source coding
Source codingSource coding
Source coding
MOHIT KUMAR
 
cp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdfcp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdf
shaikmoosa2003
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
sangusajjan
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
Rohini R Iyer
 
Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...
Smt. Indira Gandhi College of Engineering, Navi Mumbai, Mumbai
 
Huffman&Shannon-multimedia algorithms.ppt
Huffman&Shannon-multimedia algorithms.pptHuffman&Shannon-multimedia algorithms.ppt
Huffman&Shannon-multimedia algorithms.ppt
PrincessSaro
 
Encoding in sc
Encoding in scEncoding in sc
Encoding in sc
rajshreemuthiah
 
basicsofcodingtheory-160202182933-converted.pptx
basicsofcodingtheory-160202182933-converted.pptxbasicsofcodingtheory-160202182933-converted.pptx
basicsofcodingtheory-160202182933-converted.pptx
upendrabhatt13
 
akashreport
akashreportakashreport
akashreport
Akash Goel
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
Zaabir Ali
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
HarisMasood20
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
HarisMasood20
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
anithabalaprabhu
 

Similar to Lec_8_Image Compression.pdf (20)

Image compression .
Image compression .Image compression .
Image compression .
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptx
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
Compression ii
Compression iiCompression ii
Compression ii
 
Compression Ii
Compression IiCompression Ii
Compression Ii
 
Compression Ii
Compression IiCompression Ii
Compression Ii
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
Source coding
Source codingSource coding
Source coding
 
cp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdfcp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdf
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
 
Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...
 
Huffman&Shannon-multimedia algorithms.ppt
Huffman&Shannon-multimedia algorithms.pptHuffman&Shannon-multimedia algorithms.ppt
Huffman&Shannon-multimedia algorithms.ppt
 
Encoding in sc
Encoding in scEncoding in sc
Encoding in sc
 
basicsofcodingtheory-160202182933-converted.pptx
basicsofcodingtheory-160202182933-converted.pptxbasicsofcodingtheory-160202182933-converted.pptx
basicsofcodingtheory-160202182933-converted.pptx
 
akashreport
akashreportakashreport
akashreport
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
 

More from nagwaAboElenein

Difference between Active attack and Passive attack
Difference between Active attack and Passive attackDifference between Active attack and Passive attack
Difference between Active attack and Passive attack
nagwaAboElenein
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
nagwaAboElenein
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
nagwaAboElenein
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
nagwaAboElenein
 
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
nagwaAboElenein
 
security introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptxsecurity introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptx
nagwaAboElenein
 
brain tumor.pptx
brain tumor.pptxbrain tumor.pptx
brain tumor.pptx
nagwaAboElenein
 
Lec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdfLec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdf
nagwaAboElenein
 
Semantic Segmentation.pdf
Semantic Segmentation.pdfSemantic Segmentation.pdf
Semantic Segmentation.pdf
nagwaAboElenein
 
lecture1.pptx
lecture1.pptxlecture1.pptx
lecture1.pptx
nagwaAboElenein
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdf
nagwaAboElenein
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
nagwaAboElenein
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
nagwaAboElenein
 
Lecture3.pptx
Lecture3.pptxLecture3.pptx
Lecture3.pptx
nagwaAboElenein
 
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdfImage Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
nagwaAboElenein
 
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdfFundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
nagwaAboElenein
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
nagwaAboElenein
 

More from nagwaAboElenein (18)

Difference between Active attack and Passive attack
Difference between Active attack and Passive attackDifference between Active attack and Passive attack
Difference between Active attack and Passive attack
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
 
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
 
security introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptxsecurity introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptx
 
brain tumor.pptx
brain tumor.pptxbrain tumor.pptx
brain tumor.pptx
 
Lec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdfLec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdf
 
Semantic Segmentation.pdf
Semantic Segmentation.pdfSemantic Segmentation.pdf
Semantic Segmentation.pdf
 
lecture1.pptx
lecture1.pptxlecture1.pptx
lecture1.pptx
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdf
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 
Lecture3.pptx
Lecture3.pptxLecture3.pptx
Lecture3.pptx
 
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdfImage Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
 
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdfFundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 

Recently uploaded

IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
IJECEIAES
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 

Recently uploaded (20)

IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 

Lec_8_Image Compression.pdf

  • 2. Preview  Methods of compressing data prior to storage and / or transmission are of significant practical and commercial  Image compression addresses the problem of reducing the amount of data required to a digital image .  The underlying basis of the reduction process is the removal of redundant data .
  • 3. Fundamentals  The data compression refers to the process of reducing the amount of data required to represent a given quantity of information .  The difference of data and information .  Data are the means by which information is conveyed .  Data redundancy is a central issue in digital image compression
  • 4. Fundamentals  The relative data redundancy RD : Where CR is compression ratio . n1 , n2 donate the number of information – carrying units in two data set that represent the same information . n1=n2 CR =1 RD =0 n1 contains no redundant data n2 << n1 CR  ∞ RD 1 significant compress & High redundant data n2 >> n1 CR 0 RD -∞ n2 contains much more data than n1 undesirable case CR=10 every 10 information in n1 represented by 1 bit in n2 , n1 has 90% redundancy 1 1 R D C R   1 2 n R n C 
  • 5. 3 basic Data redundancies  Coding Redundancy .  Spatial and Temporal Redundancy.  i.e. Video sequence (Correlated pixels are not repeated.)  Irrelevant Information.  Information that ignored by human visual system
  • 6. Coding Redundancy  Lets assume , that a discrete random variable rK in the interval [0 , 1] represents the gray levels of an image and each rK occurs with probability k=0,1,2,……L-1 Where L is the number gray levels , nK is the number of times that the Kth gray level appears in image . n is the total number of pixel in the image . ( ) K n r K n P r  ( ) r K P r
  • 7. Coding Redundancy The average length of the code words assigned to the various gray level values where l(rk) no.of bits used to represent each gray pr(rk) probability that gray level occurs 1 0 ( ) ( ) L avg K r K K L l r p r    
  • 8. ) ( ) ( K r K avg r p r l L   . 7 . 2 ) 02 . 0 ( 6 ) 03 . 0 ( 6 ) 06 . 0 ( 5 ) 08 . 0 ( 4 ) 16 . 0 ( 3 ) 21 . 0 ( 2 ) 25 . 0 ( 2 ) 19 . 0 ( 2 bits          Example
  • 9. Example  The resulting compression ratio is 3/2.7 or 1.11 .  Thus approximately 10% of the data resulting from the use of code 1 is redundant .  The exact level of redundancy can be determine from R C 099 . 0 11 . 1 1 1    D R
  • 10. Spatial and Temporal redundancy  Each line has the same intensity  All 256intensity are of equal probability.  Pixels intensity are independent of each other  Pixels are correlated vertically  Pixels intensity can be predicted from their  Neighbor intensities, so the information carried  By one pixel is small. Histogram
  • 11. Irrelevant Information  Information that ignored by HVS are obvious candidates for omission.  Original size is 256X256X8  All are seems to be of the same color  Compression =256X256X8/8  = 65536:1
  • 12. Irrelevant Information  this type of redundancy is different from the other 2 types  Its elimination is possible because the information itself is not essential for HVS.  Its removal referred to Quantization  This means mapping of a broad range of intensity into limited range  Quantization is irreversible operation. Equalized Histogram
  • 13. How do we measure information?  What is the information content of a message/image?  What is the minimum amount of data that is sufficient to describe completely an image without loss of information?
  • 14. Modeling Information Information generation is assumed to be a probabilistic process. Idea: associate information with probability! Note: I(E)=0 when P(E)=1 The event always occurs A random event E with probability P(E) contains:
  • 15. How much information does a pixel contain? Suppose that gray level values are generated by a random variable, then rk contains: units of information!
  • 16.  Average information content of an image: units/pixel 1 0 ( )Pr( ) L k k k E I r r     using How much information does an image contain? (assumes statistically independent random events) Entropy It is not possible to code an image with fewer than H bits/pixel
  • 17. Example:  H = -[.25 log2 0.25 +.47 log2 0.47 +  .25 log2 0.25 + .03 log2 0.03]  = [-0.25(-2) +.47(-1.09) + .25(-2) +.03(-5.06)]  = 1.6614 bits/pixel  What about H for the second type of redundancy?
  • 18. Fidelity Criteria  Objective fidelity criterion Loss of information – compress – decompress .  Subjective fidelity criteria Quality of image .
  • 19. Fidelity criteria  Irrelevant information represents a loss, so we need a mean of quantifying the nature of loss  When the level of information loss can be expressed as a function of the original or input image and the compressed and decompressed output image , it is based on an objective fidelity criterion .  Example : the error at any x,y  The total error         1 0 1 0 ) , ( ) , ( ˆ M x N y y x f y x f ) , ( ) , ( ˆ ) , ( y x f y x f y x e   Approximate Original
  • 20.  The square root  The mean square signal – to – noise   2 1 0 1 0 1 0 1 0 2 ) , ( ) , ( ˆ ) , ( ˆ              M x N y M x N y rms y x f y x f y x f SNR   2 1 2 1 0 1 0 ) , ( ) , ( ˆ 1                 M x N y y x f y x f MN rms e
  • 22. Huffman Coding (coding redundancy)  A variable-length coding technique.  Optimal code (i.e., minimizes the number of code symbols per source symbol).  Assumption: symbols are encoded one at a time!
  • 23. Huffman Coding (cont’d) • Forward Pass 1. Sort probabilities per symbol 2. Combine the lowest two probabilities 3. Repeat Step2 until only two probabilities remain.
  • 24. Huffman Coding (cont’d)  Backward Pass Assign code symbols going backwards
  • 25. Huffman Coding (cont’d)  Lavg using Huffman coding:  Lavg assuming binary codes:
  • 26. Huffman Coding/Decoding  After the code has been created, coding/decoding can be implemented using a look-up table.  Note that decoding is done unambiguously.
  • 27. Arithmetic (or Range) Coding (coding redundancy)  Instead of encoding source symbols one at a time, sequences of source symbols are encoded together.  There is no one-to-one correspondence between source symbols and code words.  Slower than Huffman coding but typically achieves better compression.
  • 28. Arithmetic Coding (cont.)  A sequence of source symbols is assigned to a sub-interval in [0,1) which corresponds to an arithmetic code, e.g.,  We start with the interval [0, 1) ; as the number of symbols in the message increases, the interval used to represent the message becomes smaller. arithmetic code
  • 29. Arithmetic Coding (cont.) Encode message: α1 α2 α3 α3 α4 0 1 1) Start with interval [0, 1) 2) Subdivide [0, 1) based on the probabilities of αi 3) Update interval by processing source symbols
  • 31. Example (cont.) ▪ The message is encoded using 3 decimal digits or 3/5 = 0.6 decimal digits per source symbol. ▪ The entropy of this message is: Note: finite precision arithmetic might cause problems due to truncations! α1 α2 α3 α3 α4 -(3 x 0.2log10(0.2)+0.4log10(0.4))=0.5786 digits/symbol