SlideShare a Scribd company logo
1 of 30
Data Compression
Techniques
Module-1 (Modelling and types of compression))
Introduction to Compression Techniques- Lossy compression & Lossless
compression, Measures of Performance, Modeling and coding. Mathematical
modelling for Lossless and lossy compression - Physical models and probability
models.
Why compress data?
Storing, managing, and transferring data becomes essential in data communication
and other data-driven solutions. This is because no matter the degree of advancement
in computer hardware (RAM, ROM, GPU) and forms of communication (internet),
these resources are scarce.
To utilize these resources efficiently, the data is often required to be compressed, i.e.,
reduced to a smaller size without losing any or losing minimal information.
Compression Technique
• Data compression implies sending or storing a smaller number of bits.
Although many methods are used for this purpose, in general these
methods can be divided into two broad categories: lossless and lossy
methods.
Lossless Compression
In lossless data compression, the integrity of the data is preserved.
The original data and the data after compression and decompression are exactly the same because,
in these methods, the compression and decompression algorithms are exact inverses of each other:
no part of the data is lost in the process.
Redundant data is removed in compression and added during decompression. Lossless
compression methods are normally used when we cannot afford to lose any data.
Lossless Compression: Examples
• Text Compression
• It is very important that the reconstruction is identical to the text
original, as very small differences can result in statements with very
different meanings.
Consider the sentences “Do not send money” and
“Do now send money.”
Lossless Compression: Examples
 suppose we compressed a radiological image in a lossy fashion, and the
difference between the reconstruction and the original was visually
undetectable.
 If this image was later enhanced, the previously undetectable differences
may cause the appearance of artifacts that could seriously mislead the
radiologist
Lossless Compression: Examples
• Data obtained from satellites often are processed later to obtain
different numerical indicators of vegetation, deforestation, and so on.
• If the reconstructed data are not identical to the original data,
processing may result in “enhancement” of the differences.
• It may not be possible to go back and obtain the same data over
again
Lossy Compression
throw away perceptually insignificant information
cannot recover all bits
• In many applications, this lack of exact reconstruction is not a problem.
• For example, when storing or transmitting speech, the exact value of each
sample of speech is not necessary.
• Similarly, when viewing a reconstruction of a video sequence, the fact that
the reconstruction is different from the original is generally not important
as long as the differences do not result in annoying artifacts.
• Thus, video is generally compressed using lossy compression.
Measures of Performance
Factors affecting Performance
The relative complexity of the algorithm
 The memory required to implement the algorithm
 How fast the algorithm performs on a given machine
 The amount of compression
How closely the reconstruction resembles the original.
Compression Ratio
• The ratio of the number of bits required to represent the data before
compression to the number of bits required to represent the data after
compression. This ratio is called the compression ratio.
• Suppose storing an image made up of a square array of 256×256 pixels
requires 65,536 bytes. The image is compressed and the compressed
version requires 16,384 bytes. We would say that the compression ratio is
4:1.
• We can also represent the compression ratio by expressing the reduction in
the amount of data required as a percentage of the size of the original
data. In this particular example the compression ratio calculated in this
manner would be 75%.
• Another way of reporting compression performance is to provide the
average number of bits required to represent a single sample. This is
generally referred to as the rate.
• For example, in the case of the compressed image, if we assume 8
bits per byte (or pixel), the average number of bits per pixel in the
compressed representation is 2. Thus,
• we would say that the rate is 2 bits per pixel
• In lossy compression, the reconstruction differs from the original
data. Therefore, in order to determine the efficiency of a compression
algorithm, there have to be some way of quantifying the difference.
• The difference between the original and the reconstruction is often
called the distortion.
• fidelity and quality. When the fidelity or quality of a reconstruction is
high, it mean that the difference between the reconstruction and the
original is small
Modeling and Coding
• Data compression algorithms can be divided into two phases.
The first phase is modeling.
In this phase, try to extract information about any
redundancy that exists in the data and describe the redundancy in the form
of a model.
The second phase is called coding.
A description of the model and a “description” of how the data
differ from the model are encoded, generally using a binary alphabet.
The difference between the data and the model is often referred to as the
residual.
If we were to transmit or store the binary representations of these numbers, we would need to use 5 bits per
sample. The structure in the data can be characterized by an equation
CASE 1
The difference between the data and the model. The difference (or residual) is given
by the
010 −1 1 −101 −1 −111 The residual sequence consists of only three numbers −1 0 1.
Assign a code of 00 to −1, a code of 01 to 0, and a code of 10 to 1, so need to use 2
bits to represent each element of the residual sequence.
Therefore, compression can be obtainedby transmitting or storing the parameters of
the model and the residual sequence
• The sequence does not seem to follow a simple law as in the previous case.
• Each value is close to the previous value.
• Suppose we send the first value, then in place of subsequent values we send
the difference between it and the previous value.
CASE 2
The sequence of transmitted values would be
• The number of distinct values has been reduced.
• Fewer bits are required to represent each number and compression is achieved.
• The decoder adds each received value to the previous decoded value to obtain the
reconstruction corresponding to the received value.
• Techniques that use the past values of a sequence to predict the current value and then encode
the error in prediction, or residual, are called predictive coding schemes
• A very different type of redundancy is statistical in nature.
• There are sources that generate some symbols more often than
others. In these situations, it will be advantageous to assign binary
codes of different lengths to different symbols.
CASE 3
The sequence is made up of eight different symbols. In order to represent eight symbols, we need to
use 3 bits per symbol. Suppose instead the code shown in Table below is used
The sequence is made up of eight different symbols.
In order to represent eight symbols, we need to use 3 bits per symbol.
Suppose instead we used the code shown in Table 1.1. A codeword with only a
single bit to the symbol that occurs most often, and correspondingly longer
codewords to symbols that occur less often. After substituting the codes for each
symbol, 106 bits are required to encode the entire sequence.
As there are 41 symbols in the sequence, this works out to approximately 2.58 bits
per symbol. This means we have obtained a compression ratio of 1.16:1.
 When dealing with text, along with statistical redundancy, redundancy in the
form of words that repeat often can be considered.
 This form of redundancy can be taken by constructing a list of these words and
then represent them by their position in the list.
 This type of compression scheme is called a dictionary compression scheme
Mathematical preliminaries
iid identically distributed
• Module – 2 (Basic Compression Methods)
• Basic Compression Technique- Run length encoding, RLE Text compression. Statistical Methods- Prefix Codes,
Binary Huffman coding, non-binary Huffman Algorithms, Arithmetic Coding.
• Module - 3 (Text & Image Compression)
• Dictionary based Coding- LZ77, LZ78 and LZW compression.Image Compression- Image standards, JPEG image
Compression- Baseline JPEG, JPEG-LS.
• Module - 4 (Video Compression)
• Video Compression- Analog video, Digital Video, Motion Compensation. MPEG standards- MPEG 1, MPEG 4
• Module - 5 (Audio Compression)
• Audio Compression- Basics of Digital Audio, Basic Audio Compression Techniques, MPEG Audio Compression-
Layer 1 coding, Layer 2 coding and Layer 3 coding.
• https://cupdf.com/document/data-compression-solutions.html?page=7

More Related Content

What's hot

Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionDr Piyush Charan
 
Data Hiding Techniques
Data Hiding TechniquesData Hiding Techniques
Data Hiding Techniquesprashant3535
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Project Student
 
Steganography
Steganography Steganography
Steganography Uttam Jain
 
Lossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image ProcessingLossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image Processingpriyadharshini murugan
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler ConstructionMuhammad Haroon
 
Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..Jayanth Dwijesh H P
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionDr Piyush Charan
 
AUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONAUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONManush Desai
 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash functionMijanur Rahman Milon
 

What's hot (20)

Data compression
Data compression Data compression
Data compression
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Data Hiding Techniques
Data Hiding TechniquesData Hiding Techniques
Data Hiding Techniques
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
 
Steganography
SteganographySteganography
Steganography
 
Watermarking
WatermarkingWatermarking
Watermarking
 
Steganography
Steganography Steganography
Steganography
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Lossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image ProcessingLossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image Processing
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler Construction
 
Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
MAT Chapter 1
MAT Chapter 1MAT Chapter 1
MAT Chapter 1
 
AUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONAUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATION
 
Steganography
SteganographySteganography
Steganography
 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash function
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
 

Similar to Introduction to data compression.pptx

Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxzulhelmanz
 
dc module1 part 1.pptx
dc module1 part 1.pptxdc module1 part 1.pptx
dc module1 part 1.pptxAzmiNizar1
 
dimension reduction.ppt
dimension reduction.pptdimension reduction.ppt
dimension reduction.pptDeadpool120050
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.pptAllamJayaPrakash
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.pptAllamJayaPrakash
 
Dimensionality Reduction.pptx
Dimensionality Reduction.pptxDimensionality Reduction.pptx
Dimensionality Reduction.pptxPriyadharshiniG41
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and videosangusajjan
 
Charter1 material
Charter1 materialCharter1 material
Charter1 materialBarad Dipa
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
Pre-Processing and Data Preparation
Pre-Processing and Data PreparationPre-Processing and Data Preparation
Pre-Processing and Data PreparationUmair Shafique
 
KNOLX_Data_preprocessing
KNOLX_Data_preprocessingKNOLX_Data_preprocessing
KNOLX_Data_preprocessingKnoldus Inc.
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compressionmurugan hari
 
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
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression MethodsIOSR Journals
 

Similar to Introduction to data compression.pptx (20)

Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptx
 
dc module1 part 1.pptx
dc module1 part 1.pptxdc module1 part 1.pptx
dc module1 part 1.pptx
 
dimension reduction.ppt
dimension reduction.pptdimension reduction.ppt
dimension reduction.ppt
 
Image compression
Image compressionImage compression
Image compression
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
Dimensionality Reduction.pptx
Dimensionality Reduction.pptxDimensionality Reduction.pptx
Dimensionality Reduction.pptx
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
Himadeep
HimadeepHimadeep
Himadeep
 
Charter1 material
Charter1 materialCharter1 material
Charter1 material
 
Image Compression Techniques: A Survey
Image Compression Techniques: A SurveyImage Compression Techniques: A Survey
Image Compression Techniques: A Survey
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
PCA.pptx
PCA.pptxPCA.pptx
PCA.pptx
 
Pre-Processing and Data Preparation
Pre-Processing and Data PreparationPre-Processing and Data Preparation
Pre-Processing and Data Preparation
 
Data compression
Data compressionData compression
Data compression
 
KNOLX_Data_preprocessing
KNOLX_Data_preprocessingKNOLX_Data_preprocessing
KNOLX_Data_preprocessing
 
Data compression
Data compressionData compression
Data compression
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
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
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression Methods
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

Introduction to data compression.pptx

  • 1. Data Compression Techniques Module-1 (Modelling and types of compression)) Introduction to Compression Techniques- Lossy compression & Lossless compression, Measures of Performance, Modeling and coding. Mathematical modelling for Lossless and lossy compression - Physical models and probability models.
  • 2.
  • 3. Why compress data? Storing, managing, and transferring data becomes essential in data communication and other data-driven solutions. This is because no matter the degree of advancement in computer hardware (RAM, ROM, GPU) and forms of communication (internet), these resources are scarce. To utilize these resources efficiently, the data is often required to be compressed, i.e., reduced to a smaller size without losing any or losing minimal information.
  • 5. • Data compression implies sending or storing a smaller number of bits. Although many methods are used for this purpose, in general these methods can be divided into two broad categories: lossless and lossy methods.
  • 6. Lossless Compression In lossless data compression, the integrity of the data is preserved. The original data and the data after compression and decompression are exactly the same because, in these methods, the compression and decompression algorithms are exact inverses of each other: no part of the data is lost in the process. Redundant data is removed in compression and added during decompression. Lossless compression methods are normally used when we cannot afford to lose any data.
  • 7. Lossless Compression: Examples • Text Compression • It is very important that the reconstruction is identical to the text original, as very small differences can result in statements with very different meanings. Consider the sentences “Do not send money” and “Do now send money.”
  • 8. Lossless Compression: Examples  suppose we compressed a radiological image in a lossy fashion, and the difference between the reconstruction and the original was visually undetectable.  If this image was later enhanced, the previously undetectable differences may cause the appearance of artifacts that could seriously mislead the radiologist
  • 9. Lossless Compression: Examples • Data obtained from satellites often are processed later to obtain different numerical indicators of vegetation, deforestation, and so on. • If the reconstructed data are not identical to the original data, processing may result in “enhancement” of the differences. • It may not be possible to go back and obtain the same data over again
  • 10. Lossy Compression throw away perceptually insignificant information cannot recover all bits • In many applications, this lack of exact reconstruction is not a problem. • For example, when storing or transmitting speech, the exact value of each sample of speech is not necessary. • Similarly, when viewing a reconstruction of a video sequence, the fact that the reconstruction is different from the original is generally not important as long as the differences do not result in annoying artifacts. • Thus, video is generally compressed using lossy compression.
  • 11. Measures of Performance Factors affecting Performance The relative complexity of the algorithm  The memory required to implement the algorithm  How fast the algorithm performs on a given machine  The amount of compression How closely the reconstruction resembles the original.
  • 12. Compression Ratio • The ratio of the number of bits required to represent the data before compression to the number of bits required to represent the data after compression. This ratio is called the compression ratio. • Suppose storing an image made up of a square array of 256×256 pixels requires 65,536 bytes. The image is compressed and the compressed version requires 16,384 bytes. We would say that the compression ratio is 4:1. • We can also represent the compression ratio by expressing the reduction in the amount of data required as a percentage of the size of the original data. In this particular example the compression ratio calculated in this manner would be 75%.
  • 13. • Another way of reporting compression performance is to provide the average number of bits required to represent a single sample. This is generally referred to as the rate. • For example, in the case of the compressed image, if we assume 8 bits per byte (or pixel), the average number of bits per pixel in the compressed representation is 2. Thus, • we would say that the rate is 2 bits per pixel
  • 14. • In lossy compression, the reconstruction differs from the original data. Therefore, in order to determine the efficiency of a compression algorithm, there have to be some way of quantifying the difference. • The difference between the original and the reconstruction is often called the distortion. • fidelity and quality. When the fidelity or quality of a reconstruction is high, it mean that the difference between the reconstruction and the original is small
  • 15. Modeling and Coding • Data compression algorithms can be divided into two phases. The first phase is modeling. In this phase, try to extract information about any redundancy that exists in the data and describe the redundancy in the form of a model. The second phase is called coding. A description of the model and a “description” of how the data differ from the model are encoded, generally using a binary alphabet. The difference between the data and the model is often referred to as the residual.
  • 16. If we were to transmit or store the binary representations of these numbers, we would need to use 5 bits per sample. The structure in the data can be characterized by an equation CASE 1
  • 17. The difference between the data and the model. The difference (or residual) is given by the 010 −1 1 −101 −1 −111 The residual sequence consists of only three numbers −1 0 1. Assign a code of 00 to −1, a code of 01 to 0, and a code of 10 to 1, so need to use 2 bits to represent each element of the residual sequence. Therefore, compression can be obtainedby transmitting or storing the parameters of the model and the residual sequence
  • 18. • The sequence does not seem to follow a simple law as in the previous case. • Each value is close to the previous value. • Suppose we send the first value, then in place of subsequent values we send the difference between it and the previous value. CASE 2
  • 19. The sequence of transmitted values would be • The number of distinct values has been reduced. • Fewer bits are required to represent each number and compression is achieved. • The decoder adds each received value to the previous decoded value to obtain the reconstruction corresponding to the received value. • Techniques that use the past values of a sequence to predict the current value and then encode the error in prediction, or residual, are called predictive coding schemes
  • 20. • A very different type of redundancy is statistical in nature. • There are sources that generate some symbols more often than others. In these situations, it will be advantageous to assign binary codes of different lengths to different symbols. CASE 3
  • 21. The sequence is made up of eight different symbols. In order to represent eight symbols, we need to use 3 bits per symbol. Suppose instead the code shown in Table below is used
  • 22. The sequence is made up of eight different symbols. In order to represent eight symbols, we need to use 3 bits per symbol. Suppose instead we used the code shown in Table 1.1. A codeword with only a single bit to the symbol that occurs most often, and correspondingly longer codewords to symbols that occur less often. After substituting the codes for each symbol, 106 bits are required to encode the entire sequence. As there are 41 symbols in the sequence, this works out to approximately 2.58 bits per symbol. This means we have obtained a compression ratio of 1.16:1.
  • 23.  When dealing with text, along with statistical redundancy, redundancy in the form of words that repeat often can be considered.  This form of redundancy can be taken by constructing a list of these words and then represent them by their position in the list.  This type of compression scheme is called a dictionary compression scheme
  • 25.
  • 26.
  • 28.
  • 29.
  • 30. • Module – 2 (Basic Compression Methods) • Basic Compression Technique- Run length encoding, RLE Text compression. Statistical Methods- Prefix Codes, Binary Huffman coding, non-binary Huffman Algorithms, Arithmetic Coding. • Module - 3 (Text & Image Compression) • Dictionary based Coding- LZ77, LZ78 and LZW compression.Image Compression- Image standards, JPEG image Compression- Baseline JPEG, JPEG-LS. • Module - 4 (Video Compression) • Video Compression- Analog video, Digital Video, Motion Compensation. MPEG standards- MPEG 1, MPEG 4 • Module - 5 (Audio Compression) • Audio Compression- Basics of Digital Audio, Basic Audio Compression Techniques, MPEG Audio Compression- Layer 1 coding, Layer 2 coding and Layer 3 coding. • https://cupdf.com/document/data-compression-solutions.html?page=7