IMAGE
COMPRESSION
&
JPEG
By:
Vividh Tare Tanmay Sarkar
&
Vishwakarma Raj
From SE IT
@
THEEM COLLEGE OF ENGINEERING
IMAGE COMPRESSION
 The objective of image compression is to reduce irrelevance and redundancyof the
image datain order to be able to store or transmit datain an efficient form.
 Image compression maybe lossyor lossless.
 Lossless compression is preferredfor archival purposesand often for medical
imaging, technical drawings, clipart, or comics.
 lossycompression methods, especiallywhenused at low bit rates,
introduce compressionartifacts.
 lossymethods are especiallysuitable for natural images such as photographsin
applications where minor (sometimesimperceptible).
 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 then
decodes it to re-construct the image.
 The total data quantity of the data bits stream is less than
the total data quantity of the original image.
Image compression and jpeg
 Computer graphics can be created by
A) Software package
B) Programs
 These tools provide the graphical representation that are composed of the
various visual objects it too provides the diting of any object or
image……i.e.…circle ,oval, square etc.
 The Graphics is now represented on a high level version for building images
while others that are similar to the source code of a high level program.
 Instead of such high level programs format are being provided in the
Graphical interface.
 These kind of images (compressed) are used on internet specially to save the data for
the user as well as for the compression of graphical images / representation.
 High resolution.
 High quality.
 Can be viewed with any Hardware interface.
 Popular for the way of storing 8-bit scanned or digitized images.
 Has a better compression ratio then any other 8-bit format.
 Color images 24-bit pixels (8-bits each for R,B & G).
 It can show at least 256 colors from the 2 24 colors of the OG image.
 These 256 colors has the 24-bits each with them while the OG has the only 8-bit
with it.
 Its means the ratio of compressing this image is 3:1
 Specially LZW (Lempel-Ziv-Welsh)coding technique is used for the image
compression
 It supports pixel upto 48 bits i.e 16 bitswithR,B & G.
 LZW (Lempel-Ziv-Welsh)coding technique is usedfor theimage compression.
 It toocontains the 256 color table and thetable can be extended upto 4096
entriescontaining same stringofthe pixels that the OG imagehas being
tranferred.
 TIFF wasdesigned tobe the universal bitmapped image format.
 It’sformat is being widelyin the transferringofthe digitizeddocuments
(map/plan)
 It was createdtobecome the standard forthe imagefile exchange.
 It wasa super setofallexisting graphical imagesand the fileformat.
 This kindof image formatwas developed sothat no damaged to thepixel
quality is being done onediting it.
 It can be easilyused withall kindof thesoftware andhardwareconfiguration
easily.
 It’sauniversal losslessdatacompressionalgorithmcreatedbyAbrahamLempel,Jacob Ziv,
andTerryWelch.
 It is thealgorithmofthewidely used Unix file compressionutility compress, andis usedin
theGIF image format.
 LZWcompressionbecame thefirstwidelyuseduniversal datacompressionmethodoncomputers.
 The scenariodescribed byWelch's 1984paper encodessequencesof8-bitdataasfixed-length12-
bitcodes
 Thecodesfrom0 to255represent 1-charactersequencesconsisting ofthe corresponding8-bit
character,andthecodes 256through4095arecreatedin a dictionaryforsequencesencountered
in thedataasit is encoded.
 Ateach stagein compression,inputbytesaregatheredintoa sequenceuntil thenextcharacter
wouldmakea sequenceforwhich thereis no codeyetin thedictionary.
 Thecodeforthe sequence(withoutthatcharacter)is addedtothe output,anda new code(for the
sequencewith thatcharacter)is addedtothe dictionary.
Image compression and jpeg
Lossless Compression:-
•Lossless Compression is also called as Data Compaction.
•In lossless Compression, the redundant information contained in the
data is removed.
•Due to removal of such information, there is no loss of the data which
contains information.
•Lossless compression is achieved using those techniques which
generates an exact duplicate of the input data stream, at the receiver.
•Lossless compression is completely a reversible process.
Predictive Difference:-
• For each pixel a predictor (one of 7 possible) is used that
best predicts the value contained in the pixel as a
combination of up to 3 neighboring pixels.
• The difference between the predicted value and the actual
value (X)contained in the pixel is used as the predictive
difference to represent the pixel.
• The predictor along with the predictive difference are
encoded as the pixel’s content.
• The series of pixel values are encoded using huffman
coding
C B
A X
Predictor Prediction
P1 A
P2 B
P3 C
P4 A+B-C
P5 A + (B-C)/2
P6 B + (A-C)/2
P7 (A+B)/2
Image compression and jpeg
Lossy Compression:-
 In this type of compression, there is loss of
information in controlled manner.
 Lossy Compression is not a reversible
process.
 We cannot reproduce the duplicate of the
original picture at the receiver.
 The Lossy Compression has higher
compression without a significant loss of
important information.
 The amount of data reduction is possible,by
using Lossy Compression
Orthogonal Transform Coding:-
 KLT(Karhunen-Loeve Transform):-Maximal
Decorrelation process
 DCT(Discrete Cosine Transform):-JPEG is a DCT-
Based image compression standard, which is a
lossy coding method and may result in some loss
of details and unrecoverable distortion.
Subband Coding:-
 DWT(Discrete Wavelet Transform):-To divide the
spectrum of an image into the lowpass and the
highpass components,DWT is a famous
example.JPEG 2000 is a 2-dimension DWT based
image compression standard.
Predictive Coding:-
 DPCM:-To remove mutual reductancy between
successive pixels and encode only the new
information.
Image compression and jpeg
Image compression and jpeg
.
JPEG compression is used in a number
of image file formats. JPEG/Exif is the
most common image format used by digital
cameras and other photographic image
capture devices; along with JPEG/JFIF, it is
the most common format for storing and
transmitting photographic images on
the World Wide Web. These format
variations are often not distinguished, and
are simply called JPEG
Aphotoofacatwiththe
compressionratedecreasing,
andhencequalityincreasing,
fromlefttoright.
IMAGE COMPRESSION: JPEG
MULTIMEDIA SYSTEMS (MODULE 4 LESSON 1)
19
Summary:
 JPEG Compression
 DCT
 Quantization
 Zig-Zag Scan
 RLE
Sources:
 The JPEG website:
http://www.jpeg.org
 My research notes
 Rajan Bose
WHY JPEG
 The compression ratio of lossless methods (e.g.,
Huffman, Arithmetic, LZW) is not high enough for
image and video compression.
 JPEG uses transform coding, it is largely based on
the following observations:
 Observation 1: A large majority of useful image contents
change relatively slowly across images, i.e., it is unusual for
intensity values to alter up and down several times in a small
area, for example, within an 8 x 8 image block.
A translation of this fact into the spatial frequency domain,
implies, generally, lower spatial frequency components
contain more information than the high frequency
components which often correspond to less useful details and
noises.
 Observation 2: Experiments suggest that humans are more
immune to loss of higher spatial frequency components than
loss of lower frequency components. 20
JPEG CODING
21
Y
Cb
Cr
DPCM
RLC
Entropy
Coding
Header
Tables
Data
Coding
Tables
Quant…
Tables
DCT
f(i, j)
8 x 8
F(u, v)
8 x 8
Quantization
Fq(u, v)
Zig Zag
Scan
Steps Involved:
1. Discrete Cosine
Transform of each 8x8
pixel array
f(x,y) T F(u,v)
2. Quantization using a
table or using a constant
3. Zig-Zag scan to exploit
redundancy
4. Differential Pulse Code
Modulation(DPCM) on
the DC component and
Run length Coding of the
AC components
5. Entropy coding
(Huffman) of the final
output
DCT : DISCRETE COSINE TRANSFORM
DCT converts the information contained in a block(8x8) of pixels
from spatial domain to the frequency domain.
 A simple analogy: Consider a unsorted list of 12 numbers between 0
and 3 -> (2, 3, 1, 2, 2, 0, 1, 1, 0, 1, 0, 0). Consider a transformation
of the list involving two steps (1.) sort the list (2.) Count the
frequency of occurrence of each of the numbers ->(4,4,3,1 ). :
Through this transformation we lost the spatial information but
captured the frequency information.
 There are other transformations which retain the spatial information.
E.g., Fourier transform, DCT etc. Therefore allowing us to move
back and forth between spatial and frequency domains.
1-D DCT: 1-D Inverese DCT:
22

F() a(u)
2
f(n)cos
(2n1)
16
n  0
N1

a(0)  1
2
a(p)1 p 0 

f'(n) a(u)
2
F()cos
(2n1)
16
  0
N1

QUANTIZATION
 Why? -- To reduce number of bits per sample
F’(u,v) = round(F(u,v)/q(u,v))
 Example: 101101 = 45 (6 bits).
Truncate to 4 bits: 1011 = 11. (Compare 11 x 4 =44 against 45)
Truncate to 3 bits: 101 = 5. (Compare 8 x 5 =40 against 45)
Note, that the more bits we truncate the more precision we lose
 Quantization error is the main source of the Lossy Compression.
 Uniform Quantization:
 q(u,v) is a constant.
 Non-uniform Quantization -- Quantization Tables
 Eye is most sensitive to low frequencies (upper left corner in
frequency matrix), less sensitive to high frequencies (lower right
corner)
 Custom quantization tables can be put in image/scan header.
 JPEG Standard defines two default quantization tables, one each for
luminance and chrominance.
23
ZIG-ZAG SCAN
 Why? -- to group low frequency coefficients in top of vector and
high frequency coefficients at the bottom
 Maps 8 x 8 matrix to a 1 x 64 vector
24
8x8
. . .
1x64
Thank You For Your
Patience

More Related Content

PPTX
comparision of lossy and lossless image compression using various algorithm
PPTX
Chapter 8 image compression
PPTX
Jpeg standards
PPT
Interpixel redundancy
PPTX
PPT
Video Coding Standard
PDF
Presentation on Image Compression
comparision of lossy and lossless image compression using various algorithm
Chapter 8 image compression
Jpeg standards
Interpixel redundancy
Video Coding Standard
Presentation on Image Compression

What's hot (20)

PPT
Digital Image Processing_ ch2 enhancement spatial-domain
PPTX
JPEG Image Compression
PPT
image compresson
PPTX
Chap6 image restoration
PPTX
edge Linking dip.pptx
PPTX
Color fundamentals and color models - Digital Image Processing
PDF
Compression: Images (JPEG)
PPTX
Region based segmentation
PPTX
Dilation and erosion
PPTX
Chapter 9 morphological image processing
PPTX
Spatial Filters (Digital Image Processing)
PPTX
Image compression
PPTX
Wavelet based image compression technique
PPTX
5. gray level transformation
PPT
Image segmentation
PPTX
Image compression in digital image processing
PPTX
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
PPTX
Image segmentation
Digital Image Processing_ ch2 enhancement spatial-domain
JPEG Image Compression
image compresson
Chap6 image restoration
edge Linking dip.pptx
Color fundamentals and color models - Digital Image Processing
Compression: Images (JPEG)
Region based segmentation
Dilation and erosion
Chapter 9 morphological image processing
Spatial Filters (Digital Image Processing)
Image compression
Wavelet based image compression technique
5. gray level transformation
Image segmentation
Image compression in digital image processing
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Image segmentation
Ad

Viewers also liked (19)

PDF
JPEG Image Compression
PPTX
PPTX
PPT
Image compression jpeg coding standards
PPT
Common image compression formats
PPTX
Mp3 kodlama standarti
PPT
Image Compression
PPTX
Jpeg dct
PDF
Signal Compression and JPEG
PPT
Discrete cosine transform
PPTX
Jpeg compression
PPTX
Image compression
PPTX
Image Compression
PPT
Image compression
ODP
image compression ppt
PPTX
Italialaiset maaliskuu
PPTX
3Com 03-0172-300
PPS
Da vincicode
JPEG Image Compression
Image compression jpeg coding standards
Common image compression formats
Mp3 kodlama standarti
Image Compression
Jpeg dct
Signal Compression and JPEG
Discrete cosine transform
Jpeg compression
Image compression
Image Compression
Image compression
image compression ppt
Italialaiset maaliskuu
3Com 03-0172-300
Da vincicode
Ad

Similar to Image compression and jpeg (20)

PPT
Why Image compression is Necessary?
PPT
Multimedia image compression standards
PPT
4_14755_CS411_20182019_1__1_1_ImageCompression 1.ppt
PDF
Reduction of Blocking Artifacts In JPEG Compressed Image
PPTX
Data compression
PDF
CyberSec_JPEGcompressionForensics.pdf
PDF
Jpeg image compression using discrete cosine transform a survey
PPT
image processing for jpeg presentati.ppt
PDF
By4301435440
PPTX
Image compression
PDF
Digital Image Processing - Image Compression
PPT
notes_Image Compression.ppt
PPTX
Project presentation image compression by manish myst, ssgbcoet
PPT
notes_Image Compression_edited.ppt
PPTX
Image compression and it’s security1
PPT
Multimedia Object - Image
PPT
introduction to jpeg for image proce.ppt
PDF
steganography based image compression
PDF
Paper id 25201490
PDF
Medical images compression: JPEG variations for DICOM standard
Why Image compression is Necessary?
Multimedia image compression standards
4_14755_CS411_20182019_1__1_1_ImageCompression 1.ppt
Reduction of Blocking Artifacts In JPEG Compressed Image
Data compression
CyberSec_JPEGcompressionForensics.pdf
Jpeg image compression using discrete cosine transform a survey
image processing for jpeg presentati.ppt
By4301435440
Image compression
Digital Image Processing - Image Compression
notes_Image Compression.ppt
Project presentation image compression by manish myst, ssgbcoet
notes_Image Compression_edited.ppt
Image compression and it’s security1
Multimedia Object - Image
introduction to jpeg for image proce.ppt
steganography based image compression
Paper id 25201490
Medical images compression: JPEG variations for DICOM standard

Recently uploaded (20)

PPTX
Agentic Artificial Intelligence (Agentic AI).pptx
PPTX
Unit_1_introduction to surveying for diploma.pptx
PDF
Design of Material Handling Equipment Lecture Note
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
electrical machines course file-anna university
PPT
UNIT-I Machine Learning Essentials for 2nd years
DOCX
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
PPTX
Principal presentation for NAAC (1).pptx
PPTX
MAD Unit - 3 User Interface and Data Management (Diploma IT)
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
Computer organization and architecuture Digital Notes....pdf
PPTX
Solar energy pdf of gitam songa hemant k
PDF
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
PDF
20250617 - IR - Global Guide for HR - 51 pages.pdf
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Cisco Network Behaviour dibuywvdsvdtdstydsdsa
PDF
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
PDF
Cryptography and Network Security-Module-I.pdf
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
Agentic Artificial Intelligence (Agentic AI).pptx
Unit_1_introduction to surveying for diploma.pptx
Design of Material Handling Equipment Lecture Note
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
electrical machines course file-anna university
UNIT-I Machine Learning Essentials for 2nd years
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
Principal presentation for NAAC (1).pptx
MAD Unit - 3 User Interface and Data Management (Diploma IT)
Amdahl’s law is explained in the above power point presentations
Computer organization and architecuture Digital Notes....pdf
Solar energy pdf of gitam songa hemant k
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
20250617 - IR - Global Guide for HR - 51 pages.pdf
distributed database system" (DDBS) is often used to refer to both the distri...
Cisco Network Behaviour dibuywvdsvdtdstydsdsa
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
Cryptography and Network Security-Module-I.pdf
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT

Image compression and jpeg

  • 1. IMAGE COMPRESSION & JPEG By: Vividh Tare Tanmay Sarkar & Vishwakarma Raj From SE IT @ THEEM COLLEGE OF ENGINEERING
  • 3.  The objective of image compression is to reduce irrelevance and redundancyof the image datain order to be able to store or transmit datain an efficient form.  Image compression maybe lossyor lossless.  Lossless compression is preferredfor archival purposesand often for medical imaging, technical drawings, clipart, or comics.  lossycompression methods, especiallywhenused at low bit rates, introduce compressionartifacts.  lossymethods are especiallysuitable for natural images such as photographsin applications where minor (sometimesimperceptible).
  • 4.  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 then decodes it to re-construct the image.  The total data quantity of the data bits stream is less than the total data quantity of the original image.
  • 6.  Computer graphics can be created by A) Software package B) Programs  These tools provide the graphical representation that are composed of the various visual objects it too provides the diting of any object or image……i.e.…circle ,oval, square etc.  The Graphics is now represented on a high level version for building images while others that are similar to the source code of a high level program.  Instead of such high level programs format are being provided in the Graphical interface.
  • 7.  These kind of images (compressed) are used on internet specially to save the data for the user as well as for the compression of graphical images / representation.  High resolution.  High quality.  Can be viewed with any Hardware interface.  Popular for the way of storing 8-bit scanned or digitized images.  Has a better compression ratio then any other 8-bit format.  Color images 24-bit pixels (8-bits each for R,B & G).  It can show at least 256 colors from the 2 24 colors of the OG image.  These 256 colors has the 24-bits each with them while the OG has the only 8-bit with it.  Its means the ratio of compressing this image is 3:1  Specially LZW (Lempel-Ziv-Welsh)coding technique is used for the image compression
  • 8.  It supports pixel upto 48 bits i.e 16 bitswithR,B & G.  LZW (Lempel-Ziv-Welsh)coding technique is usedfor theimage compression.  It toocontains the 256 color table and thetable can be extended upto 4096 entriescontaining same stringofthe pixels that the OG imagehas being tranferred.  TIFF wasdesigned tobe the universal bitmapped image format.  It’sformat is being widelyin the transferringofthe digitizeddocuments (map/plan)  It was createdtobecome the standard forthe imagefile exchange.  It wasa super setofallexisting graphical imagesand the fileformat.  This kindof image formatwas developed sothat no damaged to thepixel quality is being done onediting it.  It can be easilyused withall kindof thesoftware andhardwareconfiguration easily.
  • 9.  It’sauniversal losslessdatacompressionalgorithmcreatedbyAbrahamLempel,Jacob Ziv, andTerryWelch.  It is thealgorithmofthewidely used Unix file compressionutility compress, andis usedin theGIF image format.  LZWcompressionbecame thefirstwidelyuseduniversal datacompressionmethodoncomputers.  The scenariodescribed byWelch's 1984paper encodessequencesof8-bitdataasfixed-length12- bitcodes  Thecodesfrom0 to255represent 1-charactersequencesconsisting ofthe corresponding8-bit character,andthecodes 256through4095arecreatedin a dictionaryforsequencesencountered in thedataasit is encoded.  Ateach stagein compression,inputbytesaregatheredintoa sequenceuntil thenextcharacter wouldmakea sequenceforwhich thereis no codeyetin thedictionary.  Thecodeforthe sequence(withoutthatcharacter)is addedtothe output,anda new code(for the sequencewith thatcharacter)is addedtothe dictionary.
  • 11. Lossless Compression:- •Lossless Compression is also called as Data Compaction. •In lossless Compression, the redundant information contained in the data is removed. •Due to removal of such information, there is no loss of the data which contains information. •Lossless compression is achieved using those techniques which generates an exact duplicate of the input data stream, at the receiver. •Lossless compression is completely a reversible process.
  • 12. Predictive Difference:- • For each pixel a predictor (one of 7 possible) is used that best predicts the value contained in the pixel as a combination of up to 3 neighboring pixels. • The difference between the predicted value and the actual value (X)contained in the pixel is used as the predictive difference to represent the pixel. • The predictor along with the predictive difference are encoded as the pixel’s content. • The series of pixel values are encoded using huffman coding C B A X Predictor Prediction P1 A P2 B P3 C P4 A+B-C P5 A + (B-C)/2 P6 B + (A-C)/2 P7 (A+B)/2
  • 14. Lossy Compression:-  In this type of compression, there is loss of information in controlled manner.  Lossy Compression is not a reversible process.  We cannot reproduce the duplicate of the original picture at the receiver.  The Lossy Compression has higher compression without a significant loss of important information.  The amount of data reduction is possible,by using Lossy Compression
  • 15. Orthogonal Transform Coding:-  KLT(Karhunen-Loeve Transform):-Maximal Decorrelation process  DCT(Discrete Cosine Transform):-JPEG is a DCT- Based image compression standard, which is a lossy coding method and may result in some loss of details and unrecoverable distortion. Subband Coding:-  DWT(Discrete Wavelet Transform):-To divide the spectrum of an image into the lowpass and the highpass components,DWT is a famous example.JPEG 2000 is a 2-dimension DWT based image compression standard. Predictive Coding:-  DPCM:-To remove mutual reductancy between successive pixels and encode only the new information.
  • 18. . JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other photographic image capture devices; along with JPEG/JFIF, it is the most common format for storing and transmitting photographic images on the World Wide Web. These format variations are often not distinguished, and are simply called JPEG Aphotoofacatwiththe compressionratedecreasing, andhencequalityincreasing, fromlefttoright.
  • 19. IMAGE COMPRESSION: JPEG MULTIMEDIA SYSTEMS (MODULE 4 LESSON 1) 19 Summary:  JPEG Compression  DCT  Quantization  Zig-Zag Scan  RLE Sources:  The JPEG website: http://www.jpeg.org  My research notes  Rajan Bose
  • 20. WHY JPEG  The compression ratio of lossless methods (e.g., Huffman, Arithmetic, LZW) is not high enough for image and video compression.  JPEG uses transform coding, it is largely based on the following observations:  Observation 1: A large majority of useful image contents change relatively slowly across images, i.e., it is unusual for intensity values to alter up and down several times in a small area, for example, within an 8 x 8 image block. A translation of this fact into the spatial frequency domain, implies, generally, lower spatial frequency components contain more information than the high frequency components which often correspond to less useful details and noises.  Observation 2: Experiments suggest that humans are more immune to loss of higher spatial frequency components than loss of lower frequency components. 20
  • 21. JPEG CODING 21 Y Cb Cr DPCM RLC Entropy Coding Header Tables Data Coding Tables Quant… Tables DCT f(i, j) 8 x 8 F(u, v) 8 x 8 Quantization Fq(u, v) Zig Zag Scan Steps Involved: 1. Discrete Cosine Transform of each 8x8 pixel array f(x,y) T F(u,v) 2. Quantization using a table or using a constant 3. Zig-Zag scan to exploit redundancy 4. Differential Pulse Code Modulation(DPCM) on the DC component and Run length Coding of the AC components 5. Entropy coding (Huffman) of the final output
  • 22. DCT : DISCRETE COSINE TRANSFORM DCT converts the information contained in a block(8x8) of pixels from spatial domain to the frequency domain.  A simple analogy: Consider a unsorted list of 12 numbers between 0 and 3 -> (2, 3, 1, 2, 2, 0, 1, 1, 0, 1, 0, 0). Consider a transformation of the list involving two steps (1.) sort the list (2.) Count the frequency of occurrence of each of the numbers ->(4,4,3,1 ). : Through this transformation we lost the spatial information but captured the frequency information.  There are other transformations which retain the spatial information. E.g., Fourier transform, DCT etc. Therefore allowing us to move back and forth between spatial and frequency domains. 1-D DCT: 1-D Inverese DCT: 22  F() a(u) 2 f(n)cos (2n1) 16 n  0 N1  a(0)  1 2 a(p)1 p 0   f'(n) a(u) 2 F()cos (2n1) 16   0 N1 
  • 23. QUANTIZATION  Why? -- To reduce number of bits per sample F’(u,v) = round(F(u,v)/q(u,v))  Example: 101101 = 45 (6 bits). Truncate to 4 bits: 1011 = 11. (Compare 11 x 4 =44 against 45) Truncate to 3 bits: 101 = 5. (Compare 8 x 5 =40 against 45) Note, that the more bits we truncate the more precision we lose  Quantization error is the main source of the Lossy Compression.  Uniform Quantization:  q(u,v) is a constant.  Non-uniform Quantization -- Quantization Tables  Eye is most sensitive to low frequencies (upper left corner in frequency matrix), less sensitive to high frequencies (lower right corner)  Custom quantization tables can be put in image/scan header.  JPEG Standard defines two default quantization tables, one each for luminance and chrominance. 23
  • 24. ZIG-ZAG SCAN  Why? -- to group low frequency coefficients in top of vector and high frequency coefficients at the bottom  Maps 8 x 8 matrix to a 1 x 64 vector 24 8x8 . . . 1x64
  • 25. Thank You For Your Patience