SlideShare a Scribd company logo
SOURCE CODING
By: MOHIT KUMAR
M.Tech 1st year
1
 CONTENT
 Arithmetic coding
 Lempel- ziv coding
 Run length encoding
 Rate distortion function
 Entropy rate of stochastic process
 JPEG standard
1. Lossless compression
2. Lossy compression
2
 Arithmetic coding
 It takes a stream of input symbols and replaces it with a
single floating point number in [1,0)
 The longer and more complex the message, the more
bits are needed to represents the output number
 The output of an arithmetic coding is, as usual, a
stream of bits
 However we can think that there is a prefix 0, and the
stream represents a fractional binary number between
0 and 1
01101010 → 0.01101010
 In order to explain the algorithm, numbers will be
shown as decimal, but obviously they are always binary.
3
 Example
 String bccb from the alphabet {a,b,c}
 Zero-frequency problem solved initializing at 1 all
character counters
 When the first b is to be coded all symbols have a
33% probability.
 The arithmetic coder maintains two numbers, low
and high, which represent a subinterval [low,high)
of the range [0,1)
 Initially low=0 and high=1
4
 Example
5
0
1
0.3333
0.6667
a
b
c
0.6667
0.3333
1/3
1/3
1/3
0.4167
0.5834
1/4
2/4
1/4
a
b
c
0. 5834
0. 6667
2/5
2/5
1/5
0.6001
0.6334
a
b
c
0. 6667
0.6334 a
b
c
0.6390
0.6501
3/6
2/6
1/6
[0.6390, 0.6501) 0.64
 range = high - low
 low = previous low + range * low bound of new symbol
 high = previous low + range * high bound of new symbol
6
 Example
7
 Lempel Ziv coding
 Lempel-Ziv is a lossless data compression method
algorithm
 Lossless Data compression is technique used to produce
the original information from a compressed data.
 The Lempel Ziv algorithms belong to yet another
category of lossless compression techniques known as
dictionary coders.
 The dictionary is being built in a single pass, while at the
same time encoding take places.
 It continuously rewrites the dictionary for a file,
discarding patterns it previously included and adding
new ones when necessary.
8
APPLICATIONS: APPLICATIONS:
ZIP GIF
GZIP V.42
STACKER COMPRESS
LZ77
LZR LZSS LZH LZB
LZ78
LZFG LZT LZC
LZJ LZW LZMW
9
 Run Length Encoding
 Compress any type of repeating data sequence
 At transmitter:
-identify repeating characters to replace
-if found, eliminate and replace by three- character code
10
Original data string Encoded data string
$******55.72 $Sc*655.72
--------- Sc-9
GunsScb9Butter
11
 Efficiency depends on
-number of repeated character occurrences in data to
be compressed
-average repeated character length.
 Compression ratio= length of uncompressed data
length of compressed data
 Any compression scheme will have variable
performance as the content of the input varies.
12
 It is used as an element in more complex image
compression technique.
 For run-length encoding on an image, transmission
of digital line scan is replaced by transmission of a
quantity count of each of successive run of black or
white scanned picture element.
13
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 0 0 0
0 0 0 1 0 0 1 0 0 0
0 0 0 1 1 1 1 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Length:100 bit
23W 4B 6W 1B 2W 1B 6W 4B 9W
1B 9W 1B 6W 4B 23W
or:
23 4 6 1 6 4 9 1 9 1 6 4 23
Simple run-length encoding
Run-Length Code for a 100-
pixel image
14
 100 pixel image of10X10 representation is converted to a
100-bit code.
 Each pixel is represented by a single bit indicate black or
white.
 Run-length code consist of length of alternate black or
white sequence.
 Encoded data stream is a string of number that indicate
length of alternate black or white runs.
15
 Rate Distortion
 Rate distortion theory calculates
minimum
transmission bit-rate for a given
distortion and source.
 Rate distortion theory are obtained
without consideration of a specific
coding method.
16
 Rate Distortion Function
• Definition:
• For a given maximum average distortion , the rate
distortion function R(D*) is the lower bound for the
transmission bit-rate.
• The minimization is conducted for all possible mappings
that satisfy the average distortion constraint.
• R(D*)is measured in bits.
• In rate distortion theory: minimize mutual information
I(Q) because source is given, not the channel.
17
 Entropy rate of stochastic
process
 Entropy refers to disorder of uncertainty. Entropy quantifies
amount of uncertainty involved in the value of random
variable or the outcome of random process
 How does the entropy of the sequence grow with n.
 The entropy grows (asymptotically) linearly with n at a rate
H(χ), which we will call entropy rate of a process
 The entropy of a stochastic process {Xi}
18
 JPEG image compression
ImageCompression
Lossless
Lossy
 Lossless image
compression is a
compression algorithm that
allows the original image to
be perfectly reconstructed
from the original data.
 Lossy image compression
is a type of compression
where a certain amount of
information is discarded
which means that some
data are lost and hence the
image cannot be
decompressed with 100%
originality.
19
 JPEG, which stands for Joint Photographic
Experts Group (the name of the committee that
created the JPEG standard) is a lossy
compression algorithm for images.
 A lossy compression scheme is a way to
inexactly represent the data in the image, such
that less memory is used yet the data appears to
be very similar. This is why JPEG images look
almost the same as the original images they
were derived from most of the time, unless the
quality is reduced significantly, in which case
there will be visible differences.
 The JPEG algorithm takes advantage of the fact
that humans can't see colours at high
frequencies. These high frequencies are the data
points in the image that are eliminated during the
compression. JPEG compression also works
best on images with smooth colour transitions.
20
Encoder 0101100111... Decoder
Original Image Decoded Image
Bitstream
• Flow of compression
• The image file is converted into a series of binary data,
which is called the bit-stream
• The decoder receives the encoded bit-stream and
decodes it to reconstruct the image
• The total data quantity of the bit-stream is less than
the total data quantity of the original image
21
 DCT
 The DCT uses the cosine function, therefore
not interacting with complex numbers at all.
 DCT converts the information contained in
pixels from spatial domain to the frequency
domain.
 Human vision is insensitive to high frequency
components, due to which it is possible to
treat the data corresponding to high
frequencies as redundant. To segregate the
raw image data on the basis of frequency, it
needs to be converted into frequency
domain, which is the primary function of DCT.
22
 Basic concept of
compression
Original image Compressed image
23
Thank You
24

More Related Content

What's hot

Sampling
SamplingSampling
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
mpsrekha83
 
Digital data transmission,line coding and pulse shaping
Digital data transmission,line coding and pulse shapingDigital data transmission,line coding and pulse shaping
Digital data transmission,line coding and pulse shaping
Aayush Kumar
 
Baseband shaping for data transmission
Baseband shaping for data transmissionBaseband shaping for data transmission
Baseband shaping for data transmission
sparamita
 
Digital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling TechniquesDigital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling Techniques
Biplap Bhattarai
 
Source coding
Source coding Source coding
Source coding
Shankar Gangaju
 
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass ModulationM-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
DrAimalKhan
 
Delta modulation
Delta modulationDelta modulation
Delta modulation
mpsrekha83
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
mpsrekha83
 
Channel capacity
Channel capacityChannel capacity
Channel capacity
PALLAB DAS
 
Digital communication unit II
Digital communication unit IIDigital communication unit II
Digital communication unit II
Gangatharan Narayanan
 
Trama E1 y mutlitplexación en el tiempo
Trama E1 y mutlitplexación en el tiempoTrama E1 y mutlitplexación en el tiempo
Trama E1 y mutlitplexación en el tiempo
José Ramón Salvador Collado
 
Pulse code modulation (PCM)
Pulse code modulation (PCM)Pulse code modulation (PCM)
Pulse code modulation (PCM)
Mahima Shastri
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codes
Manish Srivastava
 
Pulse code modulation and Demodulation
Pulse code modulation and DemodulationPulse code modulation and Demodulation
Pulse code modulation and Demodulation
Abdul Razaq
 
Adaptive delta modulation
Adaptive delta modulationAdaptive delta modulation
Adaptive delta modulation
mpsrekha83
 
Synchronization
SynchronizationSynchronization
Line codes
Line codesLine codes
Line codes
Madhumita Tamhane
 
ASK, FSK, PSK Modulation Techniques in Detail
ASK, FSK, PSK Modulation Techniques in DetailASK, FSK, PSK Modulation Techniques in Detail
ASK, FSK, PSK Modulation Techniques in Detail
nomanbarki
 
Broadband isdn
Broadband isdnBroadband isdn
Broadband isdn
Er Varun Kumar
 

What's hot (20)

Sampling
SamplingSampling
Sampling
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
 
Digital data transmission,line coding and pulse shaping
Digital data transmission,line coding and pulse shapingDigital data transmission,line coding and pulse shaping
Digital data transmission,line coding and pulse shaping
 
Baseband shaping for data transmission
Baseband shaping for data transmissionBaseband shaping for data transmission
Baseband shaping for data transmission
 
Digital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling TechniquesDigital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling Techniques
 
Source coding
Source coding Source coding
Source coding
 
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass ModulationM-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
 
Delta modulation
Delta modulationDelta modulation
Delta modulation
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
 
Channel capacity
Channel capacityChannel capacity
Channel capacity
 
Digital communication unit II
Digital communication unit IIDigital communication unit II
Digital communication unit II
 
Trama E1 y mutlitplexación en el tiempo
Trama E1 y mutlitplexación en el tiempoTrama E1 y mutlitplexación en el tiempo
Trama E1 y mutlitplexación en el tiempo
 
Pulse code modulation (PCM)
Pulse code modulation (PCM)Pulse code modulation (PCM)
Pulse code modulation (PCM)
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codes
 
Pulse code modulation and Demodulation
Pulse code modulation and DemodulationPulse code modulation and Demodulation
Pulse code modulation and Demodulation
 
Adaptive delta modulation
Adaptive delta modulationAdaptive delta modulation
Adaptive delta modulation
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Line codes
Line codesLine codes
Line codes
 
ASK, FSK, PSK Modulation Techniques in Detail
ASK, FSK, PSK Modulation Techniques in DetailASK, FSK, PSK Modulation Techniques in Detail
ASK, FSK, PSK Modulation Techniques in Detail
 
Broadband isdn
Broadband isdnBroadband isdn
Broadband isdn
 

Viewers also liked

Source coding theorem
Source coding theoremSource coding theorem
Source coding theorem
priyadharshini murugan
 
Digital Communication Techniques
Digital Communication TechniquesDigital Communication Techniques
Digital Communication Techniques
Prof. Swapnil V. Kaware
 
Channel coding
Channel coding  Channel coding
Channel coding
Channel codingChannel coding
Channel coding
Piyush Mittal
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
Meghna Singh
 
Basics of Coding Theory
Basics of Coding TheoryBasics of Coding Theory
Basics of Coding Theory
Piyush Mittal
 
LDPC Encoding and Hamming Encoding
LDPC Encoding and Hamming EncodingLDPC Encoding and Hamming Encoding
LDPC Encoding and Hamming Encoding
Bhagwat Singh Rathore
 
02 ldpc bit flipping_decoding_dark knight
02 ldpc bit flipping_decoding_dark knight02 ldpc bit flipping_decoding_dark knight
02 ldpc bit flipping_decoding_dark knight
Devanshi Piprottar
 
LDPC Encoding
LDPC EncodingLDPC Encoding
LDPC Encoding
Bhagwat Singh Rathore
 
Lecture3 signal encoding_in_wireless
Lecture3  signal encoding_in_wirelessLecture3  signal encoding_in_wireless
Lecture3 signal encoding_in_wireless
Yahya Alzidi
 
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHMOPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
Jitendra Choudhary
 
LDPC
LDPCLDPC
LDPC - Low Density Parity Check Matrix
LDPC - Low Density Parity Check MatrixLDPC - Low Density Parity Check Matrix
LDPC - Low Density Parity Check Matrix
Kavi
 
LZ78
LZ78LZ78
Cjb0912010 lz algorithms
Cjb0912010 lz algorithmsCjb0912010 lz algorithms
Cjb0912010 lz algorithms
RAJAN ST
 
LDPC Codes
LDPC CodesLDPC Codes
LDPC Codes
Sahar Foroughi
 
Ee443 phase locked loop - presentation - schwappach and brandy
Ee443   phase locked loop - presentation - schwappach and brandyEe443   phase locked loop - presentation - schwappach and brandy
Ee443 phase locked loop - presentation - schwappach and brandy
Loren Schwappach
 
Lz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv AlgorithmLz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv Algorithm
Veysi Ertekin
 
Data compression
Data compressionData compression
Data compression
Abhishek Grover
 
Introduction to pll
Introduction to pllIntroduction to pll
Introduction to pll
sartaj ahmed
 

Viewers also liked (20)

Source coding theorem
Source coding theoremSource coding theorem
Source coding theorem
 
Digital Communication Techniques
Digital Communication TechniquesDigital Communication Techniques
Digital Communication Techniques
 
Channel coding
Channel coding  Channel coding
Channel coding
 
Channel coding
Channel codingChannel coding
Channel coding
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
 
Basics of Coding Theory
Basics of Coding TheoryBasics of Coding Theory
Basics of Coding Theory
 
LDPC Encoding and Hamming Encoding
LDPC Encoding and Hamming EncodingLDPC Encoding and Hamming Encoding
LDPC Encoding and Hamming Encoding
 
02 ldpc bit flipping_decoding_dark knight
02 ldpc bit flipping_decoding_dark knight02 ldpc bit flipping_decoding_dark knight
02 ldpc bit flipping_decoding_dark knight
 
LDPC Encoding
LDPC EncodingLDPC Encoding
LDPC Encoding
 
Lecture3 signal encoding_in_wireless
Lecture3  signal encoding_in_wirelessLecture3  signal encoding_in_wireless
Lecture3 signal encoding_in_wireless
 
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHMOPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
OPTIMIZATION OF LZ77 DATA COMPRESSION ALGORITHM
 
LDPC
LDPCLDPC
LDPC
 
LDPC - Low Density Parity Check Matrix
LDPC - Low Density Parity Check MatrixLDPC - Low Density Parity Check Matrix
LDPC - Low Density Parity Check Matrix
 
LZ78
LZ78LZ78
LZ78
 
Cjb0912010 lz algorithms
Cjb0912010 lz algorithmsCjb0912010 lz algorithms
Cjb0912010 lz algorithms
 
LDPC Codes
LDPC CodesLDPC Codes
LDPC Codes
 
Ee443 phase locked loop - presentation - schwappach and brandy
Ee443   phase locked loop - presentation - schwappach and brandyEe443   phase locked loop - presentation - schwappach and brandy
Ee443 phase locked loop - presentation - schwappach and brandy
 
Lz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv AlgorithmLz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv Algorithm
 
Data compression
Data compressionData compression
Data compression
 
Introduction to pll
Introduction to pllIntroduction to pll
Introduction to pll
 

Similar to Source coding

notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
HarisMasood20
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
sangusajjan
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
Rohini R Iyer
 
Data compression
Data compressionData compression
Data compression
Sherif Abdelfattah
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
Zaabir Ali
 
Compression ii
Compression iiCompression ii
Compression ii
Chandra Mohan Negi
 
Image compression
Image compressionImage compression
Image compression
Bassam Kanber
 
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
ReinertYosua
 
Compression Ii
Compression IiCompression Ii
Compression Ii
anithabalaprabhu
 
Compression Ii
Compression IiCompression Ii
Compression Ii
anithabalaprabhu
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
Helan4
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
murugan hari
 
Image compression
Image compressionImage compression
Image compression
Shiva Krishna Chandra Shekar
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
theem college of engineering
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
sangusajjan
 
image compresson
image compressonimage compresson
image compresson
Ajay Kumar
 
Image compression
Image compressionImage compression
Image compression
Ale Johnsan
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
M.k. Praveen
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
Mathankumar S
 
Compression
CompressionCompression
Compression
Vishal Suri
 

Similar to Source coding (20)

notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
 
Data compression
Data compressionData compression
Data compression
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
 
Compression ii
Compression iiCompression ii
Compression ii
 
Image compression
Image compressionImage compression
Image compression
 
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
2019010413470100000524_Sesi10_Multimedia Data Compression II.ppt
 
Compression Ii
Compression IiCompression Ii
Compression Ii
 
Compression Ii
Compression IiCompression Ii
Compression Ii
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Image compression
Image compressionImage compression
Image compression
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
image compresson
image compressonimage compresson
image compresson
 
Image compression
Image compressionImage compression
Image compression
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Compression
CompressionCompression
Compression
 

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
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 

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
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 

Source coding

  • 1. SOURCE CODING By: MOHIT KUMAR M.Tech 1st year 1
  • 2.  CONTENT  Arithmetic coding  Lempel- ziv coding  Run length encoding  Rate distortion function  Entropy rate of stochastic process  JPEG standard 1. Lossless compression 2. Lossy compression 2
  • 3.  Arithmetic coding  It takes a stream of input symbols and replaces it with a single floating point number in [1,0)  The longer and more complex the message, the more bits are needed to represents the output number  The output of an arithmetic coding is, as usual, a stream of bits  However we can think that there is a prefix 0, and the stream represents a fractional binary number between 0 and 1 01101010 → 0.01101010  In order to explain the algorithm, numbers will be shown as decimal, but obviously they are always binary. 3
  • 4.  Example  String bccb from the alphabet {a,b,c}  Zero-frequency problem solved initializing at 1 all character counters  When the first b is to be coded all symbols have a 33% probability.  The arithmetic coder maintains two numbers, low and high, which represent a subinterval [low,high) of the range [0,1)  Initially low=0 and high=1 4
  • 5.  Example 5 0 1 0.3333 0.6667 a b c 0.6667 0.3333 1/3 1/3 1/3 0.4167 0.5834 1/4 2/4 1/4 a b c 0. 5834 0. 6667 2/5 2/5 1/5 0.6001 0.6334 a b c 0. 6667 0.6334 a b c 0.6390 0.6501 3/6 2/6 1/6 [0.6390, 0.6501) 0.64
  • 6.  range = high - low  low = previous low + range * low bound of new symbol  high = previous low + range * high bound of new symbol 6
  • 8.  Lempel Ziv coding  Lempel-Ziv is a lossless data compression method algorithm  Lossless Data compression is technique used to produce the original information from a compressed data.  The Lempel Ziv algorithms belong to yet another category of lossless compression techniques known as dictionary coders.  The dictionary is being built in a single pass, while at the same time encoding take places.  It continuously rewrites the dictionary for a file, discarding patterns it previously included and adding new ones when necessary. 8
  • 9. APPLICATIONS: APPLICATIONS: ZIP GIF GZIP V.42 STACKER COMPRESS LZ77 LZR LZSS LZH LZB LZ78 LZFG LZT LZC LZJ LZW LZMW 9
  • 10.  Run Length Encoding  Compress any type of repeating data sequence  At transmitter: -identify repeating characters to replace -if found, eliminate and replace by three- character code 10
  • 11. Original data string Encoded data string $******55.72 $Sc*655.72 --------- Sc-9 GunsScb9Butter 11
  • 12.  Efficiency depends on -number of repeated character occurrences in data to be compressed -average repeated character length.  Compression ratio= length of uncompressed data length of compressed data  Any compression scheme will have variable performance as the content of the input varies. 12
  • 13.  It is used as an element in more complex image compression technique.  For run-length encoding on an image, transmission of digital line scan is replaced by transmission of a quantity count of each of successive run of black or white scanned picture element. 13
  • 14. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Length:100 bit 23W 4B 6W 1B 2W 1B 6W 4B 9W 1B 9W 1B 6W 4B 23W or: 23 4 6 1 6 4 9 1 9 1 6 4 23 Simple run-length encoding Run-Length Code for a 100- pixel image 14
  • 15.  100 pixel image of10X10 representation is converted to a 100-bit code.  Each pixel is represented by a single bit indicate black or white.  Run-length code consist of length of alternate black or white sequence.  Encoded data stream is a string of number that indicate length of alternate black or white runs. 15
  • 16.  Rate Distortion  Rate distortion theory calculates minimum transmission bit-rate for a given distortion and source.  Rate distortion theory are obtained without consideration of a specific coding method. 16
  • 17.  Rate Distortion Function • Definition: • For a given maximum average distortion , the rate distortion function R(D*) is the lower bound for the transmission bit-rate. • The minimization is conducted for all possible mappings that satisfy the average distortion constraint. • R(D*)is measured in bits. • In rate distortion theory: minimize mutual information I(Q) because source is given, not the channel. 17
  • 18.  Entropy rate of stochastic process  Entropy refers to disorder of uncertainty. Entropy quantifies amount of uncertainty involved in the value of random variable or the outcome of random process  How does the entropy of the sequence grow with n.  The entropy grows (asymptotically) linearly with n at a rate H(χ), which we will call entropy rate of a process  The entropy of a stochastic process {Xi} 18
  • 19.  JPEG image compression ImageCompression Lossless Lossy  Lossless image compression is a compression algorithm that allows the original image to be perfectly reconstructed from the original data.  Lossy image compression is a type of compression where a certain amount of information is discarded which means that some data are lost and hence the image cannot be decompressed with 100% originality. 19
  • 20.  JPEG, which stands for Joint Photographic Experts Group (the name of the committee that created the JPEG standard) is a lossy compression algorithm for images.  A lossy compression scheme is a way to inexactly represent the data in the image, such that less memory is used yet the data appears to be very similar. This is why JPEG images look almost the same as the original images they were derived from most of the time, unless the quality is reduced significantly, in which case there will be visible differences.  The JPEG algorithm takes advantage of the fact that humans can't see colours at high frequencies. These high frequencies are the data points in the image that are eliminated during the compression. JPEG compression also works best on images with smooth colour transitions. 20
  • 21. Encoder 0101100111... Decoder Original Image Decoded Image Bitstream • Flow of compression • The image file is converted into a series of binary data, which is called the bit-stream • The decoder receives the encoded bit-stream and decodes it to reconstruct the image • The total data quantity of the bit-stream is less than the total data quantity of the original image 21
  • 22.  DCT  The DCT uses the cosine function, therefore not interacting with complex numbers at all.  DCT converts the information contained in pixels from spatial domain to the frequency domain.  Human vision is insensitive to high frequency components, due to which it is possible to treat the data corresponding to high frequencies as redundant. To segregate the raw image data on the basis of frequency, it needs to be converted into frequency domain, which is the primary function of DCT. 22
  • 23.  Basic concept of compression Original image Compressed image 23