SlideShare uma empresa Scribd logo
1 de 15
Term paper
Image compressIon
In
DaTa compressIon

submITTeD by:JabIr alI
roll no.a90
cap 604
reg-11102338
submITTeD To:sarucHI mam
Acknowledgement
I would like to express my special thanks of
gratitude to my teacher who gave me the
golden opportunity to do this wonderful
project on the topic (“image compression in
data compression”) which also helped me in
doing a lot of research and I came to know
about so many new things I am really
thankful to him .
Secondly I would also like to thank my parents
and friends who helped me a lot in finishing
this project within the limited time I am
making this project not only for marks but
to also increase my knowledge thanks again
to all who helped me.
1.
2.
3.
4.
5.

CONTENT
Introduction to image comp.
Image Compression Coding
Reduce the Correlation between Pixels
Quantization
Entropy Coding
• Differential encoding
• Huffman encoding
• Frame building

Introduction to image compression
Image compression is an application of data compression that encodes
the original image with few bits. The objective of image compression is to
reduce the redundancy of the image and to store or transmit data in an
efficient form. shows the block diagram of the general image storage
system. The main goal of such system is to reduce the storage quantity as
much as possible, and the decoded image displayed in the monitor can be
similar to the original image as much as can be.
Color specification
(1) Luminance: received brightness of the light, which is proportional to
the total
energy in the visible band.
(2)Chrominance: describe the perceived color tone of a light, which
depends on
the wavelength composition of light chrominance is in turn characterized
by two attributes – hue and saturation.
1. hue: Specify the color tone, which depends on the peak wavelength of
the light
2. saturation: Describe how pure the color is, which depends on the spread
or
bandwidth of the light spectrum

Image Compression Coding
Image compression coding is to store the image into bit-stream as
compact as possible and to display the decoded image in the monitor as
exact as possible. Now consider an encoder and a decoder as When the
encoder receives the original image file, the image file will be converted
into a series of binary data, which is called the bit-stream. The decoder
then receives the encoded bit-stream and decodes it to form the decoded
image. If the total data quantity of the bit-stream is less than the total data
quantity of the original image, then this is called image compression.
Reduce the Correlation between Pixels
The correlation between one pixel and its neighbor pixels is very high, or we can
say that the values of one pixel and its adjacent pixels are very similar. Once the
correlation between the pixels is reduced, we can take advantage of the statistical
characteristics and the variable length coding theory to reduce the storage
quantity. This is the most important part of the image compression algorithm;
there are a lot of relevant processing methods being
proposed.
Predictive Coding: Predictive Coding such as DPCM (Differential Pulse
Code Modulation) is a lossless coding method, which means that the decoded
image and the original image have the same value for every corresponding
element.
Orthogonal Transform: Discrete Cosine Transform (DCT) are the two most
well-known orthogonal transforms. The DCT-based image compression
standard such as JPEG is a lossy coding method that will result in some loss of
details and unrecoverable distortion.
Subband Coding: Sub band Coding such as Discrete Wavelet Transform(DWT)
is also a lossy coding method. The objective of sub band coding is to divide the
spectrum of one image into the low pass and the high pass components. JPEG
2000 is a 2-dimension DWT based image compression standard.

Quantization
The main objective of entropy coding is to achieve less average length of the
image. Entropy coding assigns code words to the corresponding symbols
according to the probability of the symbols. In general, the entropy encoders are
used to compress the data by replacing symbols represented by equal-length
codes with the code words whose length is inverse proportional to corresponding
probability.

JPEG – Joint Picture Expert Group
The Encoder and Decoder model of JPEG. We will introduce the operation and
fundamental theory of each block in the following sections.
The Encoder model of JPEG compression standard
The Encoder model of JPEG compression standard
The Decoder model of JPEG compression standard
Quantization in JPEG
The goal of quantization is to reduce most of the less important high frequency
DCT coefficients to zero, the more zeros we generate the better the image will
compress. The matrix Q generally has lower numbers in the upper left direction
and large numbers in the lower right direction. Though the high-frequency
components are removed, the IDCT still can obtain an approximate matrix
which is close to the original 8×8 block matrix. The JPEG committee has
recommended certain Q matrix that work well and the performance is close to
the optimal condition, the Q matrix for luminance and chrominance components
is defined.
Zigzag Scan
After quantization, the DC coefficient is treated separately from the 63 AC
coefficients. The DC coefficient is a measure of the average value of the original
64 image samples. Because there is usually strong correlation between the DC
coefficients of adjacent 8×8 blocks, the quantized DC coefficient is encoded as
the difference from the DC term of the previous block. This special treatment is
worthwhile, as DC coefficients frequently contain a significant fraction of the
total image energy. The other 63 entries are the AC components. They are
treated separately from the DC coefficients in the entropy coding process.

The zigzag scan
Entropy Coding in JPEG

Differential Coding
The mathematical representation of the differential coding is:

Differential Coding

Run-Length Coding
After quantization and zigzag scanning, we obtain the one-dimensional vectors
with a lot of consecutive zeroes. We can make use of this property and apply
zero-run -length coding, which is variable length coding. Let us consider the 63
AC coefficients in the original 64 quantized vectors first.
57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0
We encode then encode the vector
(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) EOB
The notation (L,F) means that there are L zeros in front of F, and EOB (End of
Block) is a special coded value means that the rest elements are all zeros. If the
last element of the vector is not zero, then the EOB marker will not be added. On
the other hand, EOC is equivalent to (0,0), so we can express
(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) ; (0,0)

Huffman Encoding
Significant levels of compression can be obtained by replacing long string of
binary digits by a string of much shorter code words
The length of each code word being a function of its relative frequency of
occurrence
The JPEG Huffman coding restricts the number of previous zero(s) within 15
because
the length of the encoded data is 4 bits. Hence, we can encode
57, eighteen zeroes, 3, 0, 0, 0, 0, 2, thirty-three zeroes, 895, EOB into
(0,57) ; (15,0) ; (2,3) ; (4,2) ; (15,0) ; (15,0) ; (1,895) ; (0,0)
(15,0) is a special coded value which indicates that there are 16 consecutive
zeroes.
Therefore, the both of the values 18 and 33 are converted to 15.
The right value of the bracket is called category, and
the left value of the bracket is called run. We can encode the category by looking
up which is specified in the JPEG standard. For example, 57 is in the category 6
and the bits for the value is 111001, so we encode it as 6,111001. The full
encoded
sequence of 57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0
(0,6,111001);(0,6,101101);(4,5,10111);(1,5,00001);(0,4,0111);(2,1,1);(0,0)
The JPEG standard specifies the Huffman table for encoding the AC
coefficients
The final step is to encode by using the Huffman
The encoding method is quite easy and straight forward. For instance, the code
(0,6)
is encoded as 1111000, and the code (4,5) is encoded as 1111111110001000. The
final
bit-stream stored in the JPEG file
57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0
1111000 1111001 , 111000 101101 , 1111111110011000 10111 ,
11111110110 00001 , 1011 0111 , 11100 1 , 1010
Frame Building
The frame builder is to encapsulate all the information relating to an encoded
image/picture in this format

Mais conteúdo relacionado

Mais procurados

Discrete Cosine Transform Stegonagraphy
Discrete Cosine Transform StegonagraphyDiscrete Cosine Transform Stegonagraphy
Discrete Cosine Transform Stegonagraphy
Kaushik Chakraborty
 
Image compression introductory presentation
Image compression introductory presentationImage compression introductory presentation
Image compression introductory presentation
Tariq Abbas
 

Mais procurados (20)

Oblivious Neural Network Predictions via MiniONN Transformations
Oblivious Neural Network Predictions via MiniONN TransformationsOblivious Neural Network Predictions via MiniONN Transformations
Oblivious Neural Network Predictions via MiniONN Transformations
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 
data compression technique
data compression techniquedata compression technique
data compression technique
 
Lossy
LossyLossy
Lossy
 
lossy compression JPEG
lossy compression JPEGlossy compression JPEG
lossy compression JPEG
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancy
 
Image compression
Image compressionImage compression
Image compression
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
 
Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniques
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 
Discrete Cosine Transform Stegonagraphy
Discrete Cosine Transform StegonagraphyDiscrete Cosine Transform Stegonagraphy
Discrete Cosine Transform Stegonagraphy
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
3 mathematical priliminaries DATA compression
3 mathematical priliminaries DATA compression3 mathematical priliminaries DATA compression
3 mathematical priliminaries DATA compression
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Image compression introductory presentation
Image compression introductory presentationImage compression introductory presentation
Image compression introductory presentation
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
 
JPEG
JPEGJPEG
JPEG
 
Run length encoding
Run length encodingRun length encoding
Run length encoding
 
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...
 

Destaque

WP Comms and Multicultural Teams
WP Comms and Multicultural TeamsWP Comms and Multicultural Teams
WP Comms and Multicultural Teams
Nick Royle
 

Destaque (6)

WP Comms and Multicultural Teams
WP Comms and Multicultural TeamsWP Comms and Multicultural Teams
WP Comms and Multicultural Teams
 
Data compression
Data compressionData compression
Data compression
 
neutral architectures I N operating system
neutral architectures I N operating systemneutral architectures I N operating system
neutral architectures I N operating system
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Semelhante a image compression in data compression

VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
sangusajjan
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
sangusajjan
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490
IJRAT
 

Semelhante a image compression in data compression (20)

Source coding
Source codingSource coding
Source coding
 
Squashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse MatrixSquashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse Matrix
 
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIXSQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
 
Squashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse MatrixSquashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse Matrix
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
JPEG
JPEGJPEG
JPEG
 
Image compression Algorithms
Image compression AlgorithmsImage compression Algorithms
Image compression Algorithms
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?
 
MPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video EncodingMPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video Encoding
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Comparison of different Fingerprint Compression Techniques
Comparison of different Fingerprint Compression TechniquesComparison of different Fingerprint Compression Techniques
Comparison of different Fingerprint Compression Techniques
 
B070306010
B070306010B070306010
B070306010
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490
 
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Último (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

image compression in data compression

  • 1. Term paper Image compressIon In DaTa compressIon submITTeD by:JabIr alI roll no.a90 cap 604 reg-11102338 submITTeD To:sarucHI mam
  • 2. Acknowledgement I would like to express my special thanks of gratitude to my teacher who gave me the golden opportunity to do this wonderful project on the topic (“image compression in data compression”) which also helped me in doing a lot of research and I came to know about so many new things I am really thankful to him . Secondly I would also like to thank my parents and friends who helped me a lot in finishing this project within the limited time I am making this project not only for marks but to also increase my knowledge thanks again to all who helped me.
  • 3. 1. 2. 3. 4. 5. CONTENT Introduction to image comp. Image Compression Coding Reduce the Correlation between Pixels Quantization Entropy Coding • Differential encoding • Huffman encoding • Frame building Introduction to image compression Image compression is an application of data compression that encodes the original image with few bits. The objective of image compression is to reduce the redundancy of the image and to store or transmit data in an efficient form. shows the block diagram of the general image storage system. The main goal of such system is to reduce the storage quantity as much as possible, and the decoded image displayed in the monitor can be similar to the original image as much as can be.
  • 4. Color specification (1) Luminance: received brightness of the light, which is proportional to the total energy in the visible band. (2)Chrominance: describe the perceived color tone of a light, which depends on the wavelength composition of light chrominance is in turn characterized by two attributes – hue and saturation. 1. hue: Specify the color tone, which depends on the peak wavelength of the light 2. saturation: Describe how pure the color is, which depends on the spread or bandwidth of the light spectrum Image Compression Coding Image compression coding is to store the image into bit-stream as compact as possible and to display the decoded image in the monitor as exact as possible. Now consider an encoder and a decoder as When the encoder receives the original image file, the image file will be converted into a series of binary data, which is called the bit-stream. The decoder then receives the encoded bit-stream and decodes it to form the decoded image. If the total data quantity of the bit-stream is less than the total data quantity of the original image, then this is called image compression.
  • 5. Reduce the Correlation between Pixels The correlation between one pixel and its neighbor pixels is very high, or we can say that the values of one pixel and its adjacent pixels are very similar. Once the correlation between the pixels is reduced, we can take advantage of the statistical characteristics and the variable length coding theory to reduce the storage quantity. This is the most important part of the image compression algorithm; there are a lot of relevant processing methods being proposed. Predictive Coding: Predictive Coding such as DPCM (Differential Pulse Code Modulation) is a lossless coding method, which means that the decoded image and the original image have the same value for every corresponding element. Orthogonal Transform: Discrete Cosine Transform (DCT) are the two most well-known orthogonal transforms. The DCT-based image compression standard such as JPEG is a lossy coding method that will result in some loss of details and unrecoverable distortion. Subband Coding: Sub band Coding such as Discrete Wavelet Transform(DWT) is also a lossy coding method. The objective of sub band coding is to divide the
  • 6. spectrum of one image into the low pass and the high pass components. JPEG 2000 is a 2-dimension DWT based image compression standard. Quantization The main objective of entropy coding is to achieve less average length of the image. Entropy coding assigns code words to the corresponding symbols according to the probability of the symbols. In general, the entropy encoders are used to compress the data by replacing symbols represented by equal-length codes with the code words whose length is inverse proportional to corresponding probability. JPEG – Joint Picture Expert Group The Encoder and Decoder model of JPEG. We will introduce the operation and fundamental theory of each block in the following sections. The Encoder model of JPEG compression standard
  • 7. The Encoder model of JPEG compression standard
  • 8. The Decoder model of JPEG compression standard
  • 9. Quantization in JPEG The goal of quantization is to reduce most of the less important high frequency DCT coefficients to zero, the more zeros we generate the better the image will compress. The matrix Q generally has lower numbers in the upper left direction and large numbers in the lower right direction. Though the high-frequency components are removed, the IDCT still can obtain an approximate matrix which is close to the original 8×8 block matrix. The JPEG committee has recommended certain Q matrix that work well and the performance is close to the optimal condition, the Q matrix for luminance and chrominance components is defined.
  • 10.
  • 11. Zigzag Scan After quantization, the DC coefficient is treated separately from the 63 AC coefficients. The DC coefficient is a measure of the average value of the original 64 image samples. Because there is usually strong correlation between the DC coefficients of adjacent 8×8 blocks, the quantized DC coefficient is encoded as the difference from the DC term of the previous block. This special treatment is worthwhile, as DC coefficients frequently contain a significant fraction of the total image energy. The other 63 entries are the AC components. They are treated separately from the DC coefficients in the entropy coding process. The zigzag scan
  • 12. Entropy Coding in JPEG Differential Coding The mathematical representation of the differential coding is: Differential Coding Run-Length Coding After quantization and zigzag scanning, we obtain the one-dimensional vectors with a lot of consecutive zeroes. We can make use of this property and apply zero-run -length coding, which is variable length coding. Let us consider the 63 AC coefficients in the original 64 quantized vectors first. 57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0 We encode then encode the vector (0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) EOB The notation (L,F) means that there are L zeros in front of F, and EOB (End of Block) is a special coded value means that the rest elements are all zeros. If the
  • 13. last element of the vector is not zero, then the EOB marker will not be added. On the other hand, EOC is equivalent to (0,0), so we can express (0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) ; (0,0) Huffman Encoding Significant levels of compression can be obtained by replacing long string of binary digits by a string of much shorter code words The length of each code word being a function of its relative frequency of occurrence The JPEG Huffman coding restricts the number of previous zero(s) within 15 because the length of the encoded data is 4 bits. Hence, we can encode 57, eighteen zeroes, 3, 0, 0, 0, 0, 2, thirty-three zeroes, 895, EOB into (0,57) ; (15,0) ; (2,3) ; (4,2) ; (15,0) ; (15,0) ; (1,895) ; (0,0) (15,0) is a special coded value which indicates that there are 16 consecutive zeroes. Therefore, the both of the values 18 and 33 are converted to 15. The right value of the bracket is called category, and the left value of the bracket is called run. We can encode the category by looking up which is specified in the JPEG standard. For example, 57 is in the category 6 and the bits for the value is 111001, so we encode it as 6,111001. The full encoded sequence of 57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0 (0,6,111001);(0,6,101101);(4,5,10111);(1,5,00001);(0,4,0111);(2,1,1);(0,0)
  • 14. The JPEG standard specifies the Huffman table for encoding the AC coefficients The final step is to encode by using the Huffman The encoding method is quite easy and straight forward. For instance, the code (0,6) is encoded as 1111000, and the code (4,5) is encoded as 1111111110001000. The final bit-stream stored in the JPEG file 57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0 1111000 1111001 , 111000 101101 , 1111111110011000 10111 , 11111110110 00001 , 1011 0111 , 11100 1 , 1010
  • 15. Frame Building The frame builder is to encapsulate all the information relating to an encoded image/picture in this format