SlideShare a Scribd company logo
1 of 35
B.Tech (EEE) 2007-2011

Image

Compression

B.Tech (6th Semester)
Electrical & Electronics Engineering
College Of Engineering Roorkee
Contents ...
Image Compression
Lossy Compression

Lossless Compression
JPEG Compression Algorithm
DCT v/s DWT
Applications of Image Processing
Advantages /Disadvantages of Image Processing
What is Image Compression ?
 Application of data compression on digital images

 Reduce redundancy of the image data

Benefits of Image Compression
 Store data efficiently
 Transmit data efficiently
Lossy Compression

 Decompression retrieves data different
from the original
 Used to compress multimedia data
 Streaming media and internet telephony

Methods
JPEG

TIFF

MNG

PGF
Original Image Before Compression
Decompressed Image After Compression
Before Compression

186 KB

57053

26 KB

31760

After Compression

Image

Size

Colour Used
Lossless Compression
 Exact reconstruction of original data

 Executable programs and source codes
 Data loss cant be tolerated

Methods
JPEG
2000

GIF

PNG

TIFF
Original Image Before Compression
Decompressed Image After Compression
Before Compression

186 KB

57053

136 KB

57053

After Compression

Image

Size

Colour Used
What is JPEG ?
 Stands for Joint Photographics Experts
Group
 Lossy compression method
 Mostly used by digital cameras & web
usage
 Not suited for drawing , textual and iconic
graphics
Basics of JPEG Compression
 Human vision is insensitive to high spatial frequencies
 JPEG Takes advantage of this by compressing high frequencies more
coarsely and storing image as frequency data

Losslessly compressed
image,
150KB

JPEG compressed,
14KB
The JPEG Compression Algorithm
 Divide image into 8x8 pixel blocks
 Apply 2D Fourier Discrete Cosine Transform
(FDCT) Transform
 Apply coarse quantization to high spatial
frequency components
 Compress resulting data losslessly and store
8x8
pixel
blocks

FDCT

Frequency
Dependent
quantization
Quantization
Table

Zig-zag
scan

RLE

Huffman
Encoding

output
The JPEG File Structure
Short name
SOI

Bytes
0xFFD8

Size
none

Name
Start Of Image

SOF0

0xFFC0

variable size

Start Of Frame (Baseline
DCT)

SOF2

0xFFC2

variable size

Start Of Frame
(Progressive DCT)

DHT

0xFFC4

variable size

DQT

0xFFDB

variable size

DRI

0xFFDD

2 bytes

SOS

0xFFDA

variable size

RSTn

0xFFD0 … 0xFFD7

none

APPn

0xFFEn

variable size

Application-specific

COM
EOI

0xFFFE
0xFFD9

variable size
none

Comment
End Of Image

Define Huffman Table(s)
Define Quantization
Table(s)

Define Restart Interval

Start Of Scan

Restart
1/7 : Divided into 8x8 blocks
1/7 : Divided into 8x8 blocks
2/7 : Convert RGB to YCbCr
 Simple color space model: [R,G,B] per pixel
 JPEG uses [Y, Cb, Cr] Model

 Y (Brightness) = 0.299R + 0.587G + 0.114B
Cb (Color blueness) = -0.1687R - 0.3313G + 0.5B + 128
Cr (Color redness) = 0.5R - 0.4187G - 0.0813B + 128
2/7 : Convert RGB to YCbCr
3/7 : Downsampling ( optional )
 Y is taken every pixel , and Cb,Cr are taken for a block of 2x2 pixels
 MCU(minimu
m coded unit) :
The smallest
group of data
units that is
coded.
 Data size
reduces to a
half
immediately
4/7 : Apply DCT [ Discrete Cosine Transformation ]
2D DCT:

1D DCT:
4/7 : Apply DCT [ Discrete Cosine Transformation ]
Shift operations
From [0, 255]
To [-128, 127]

DCT
Result
5/7 : Quantization

Luminance Quantization Matrix

Chrominance Quantization Matrix

Each DCT coefficient F(u, v) is divided by the corresponding quantizer
step-size parameter Q(u, v) in the quantization matrix and rounded
to the nearest integer as
5/7 : Quantization [ Quality Factor ]
Quality of the reconstructed image and the achieved
compression can be controlled by a user by selecting a
quality factor [ Q_JPEG ] :
 Q_JPEG ranges between 1 to 100

 When Q_JPEG is used, the entries in tables in previous slide is
scaled by the factor alpha (α), defined as :

 Q_JPEG is 100 for best reproduction
5/7 : Quantization
DCT result

Quantization Matrix

Quantization
result
6/7 : Zigzag reordering & RLE

Quantization
result
7/7 : Huffman encoding
Values

G

0
0
-1, 1
1
-3, -2, 2, 3
2
-7,-6,-5,-4,5,6,7 3
.
4
.
5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
-32767..32767 15

Real saved values
.
0,1
00, 01, 10, 11
000,001,010,011,100,101,110,111

.
.
.
.
.
.
.
.
.

 RLC result:
[0, -3] [0, 12] [0,
3]......EOB
 After group number added:
[0,2,00b] [0,4,1100b]
[0,2,00b]
...... EOB
 First Huffman coding (i.e. for
[0,2,00b] ):
[0, 2, 00b] => [100b,
00b]

Input : 512 bits
Output : 113 bits
% Red : 22.07 %
JPEG Compression Ratio

500KB image,
minimum
compression

40KB image,
half
compression

11KB
image, max
compression
Effects of varying JPEG Compression Ratio

Uncompressed image

Half compression,
Blurring around sharp
edges

Max compression,
8-pixel blocks
apparent, large distortion
in high-frequency areas
DWT v/s DCT
 Images containing sharp
edges/continuous curves

 Uses more optimal set
of functions to represent
sharp edges
 Wavelets are finite in
extent

Different families of wavelets
DWT v/s DCT

Wavelet compression
file size: 1861 bytes
compression ratio - 105.6

JPEG compression
file size: 1895 bytes
compression ratio - 103.8

Source: http://www.barrt.ru/parshukov/about.htm.
Applications of Image Processing
Computer Vision

Optical Sorting
Face Detection

Feature Detection
Augmented Reality
Remote Sensing
Medical Image Processing
Advantages/Disadvantages of Image Processing
Post-processing
High cost

Easy Sharing
Easy Retrieval

Environment
Friendly
Multiple Use

Disadvantages

Advantages

Easy Storage
Extra Knowledge
High Maintenance
Standardization
Shape/Size of
detectors
Any
info4eee
An initiative for B.Tech (EEE) Student

More Related Content

What's hot

Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGmuthu181188
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filteringGautam Saxena
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram ProcessingAmnaakhaan
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image CompressionMathankumar S
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression techniquePriyanka Pachori
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compressionKadamPawan
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationMostafa G. M. Mostafa
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compressionjeevithaelangovan
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafMD Naseem Ashraf
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
Transform coding
Transform codingTransform coding
Transform codingNancy K
 

What's hot (20)

Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 
Run length encoding
Run length encodingRun length encoding
Run length encoding
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compression
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Transform coding
Transform codingTransform coding
Transform coding
 

Similar to Image Compression

Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?Prabhat Kumar
 
CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfMohammadAzreeYahaya
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.pptnaghamallella
 
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 MATRIXijcsit
 
IMAGE COMPRESSION BY EMBEDDING FIVE MODULUS METHOD INTO JPEG
IMAGE COMPRESSION BY EMBEDDING FIVE  MODULUS METHOD INTO JPEGIMAGE COMPRESSION BY EMBEDDING FIVE  MODULUS METHOD INTO JPEG
IMAGE COMPRESSION BY EMBEDDING FIVE MODULUS METHOD INTO JPEGsipij
 
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 standardsRishab2612
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)danishrafiq
 
Image compression and it’s security1
Image compression and it’s security1Image compression and it’s security1
Image compression and it’s security1Reyad Hossain
 
Kassem2009
Kassem2009Kassem2009
Kassem2009lazchi
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490IJRAT
 

Similar to Image Compression (20)

Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Jpeg
JpegJpeg
Jpeg
 
Medical image compression
Medical image compressionMedical image compression
Medical image compression
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?
 
CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdf
 
Steganography Part 2
Steganography Part 2Steganography Part 2
Steganography Part 2
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.ppt
 
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
 
IMAGE COMPRESSION BY EMBEDDING FIVE MODULUS METHOD INTO JPEG
IMAGE COMPRESSION BY EMBEDDING FIVE  MODULUS METHOD INTO JPEGIMAGE COMPRESSION BY EMBEDDING FIVE  MODULUS METHOD INTO JPEG
IMAGE COMPRESSION BY EMBEDDING FIVE MODULUS METHOD INTO JPEG
 
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
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
 
Multimedia Object - Image
Multimedia Object - ImageMultimedia Object - Image
Multimedia Object - Image
 
Image compression and it’s security1
Image compression and it’s security1Image compression and it’s security1
Image compression and it’s security1
 
Kassem2009
Kassem2009Kassem2009
Kassem2009
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490
 
Jpeg and mpeg ppt
Jpeg and mpeg pptJpeg and mpeg ppt
Jpeg and mpeg ppt
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 

More from Paramjeet Singh Jamwal

Fundamentals of Electric Drives - Electric Drives
Fundamentals of Electric Drives - Electric DrivesFundamentals of Electric Drives - Electric Drives
Fundamentals of Electric Drives - Electric DrivesParamjeet Singh Jamwal
 
DC Network Theory - Basic Electrical Engineering
DC Network Theory - Basic Electrical EngineeringDC Network Theory - Basic Electrical Engineering
DC Network Theory - Basic Electrical EngineeringParamjeet Singh Jamwal
 
Virtual Instrumentation and Data Acquisition - PGICE - 2013
Virtual Instrumentation and Data Acquisition - PGICE - 2013Virtual Instrumentation and Data Acquisition - PGICE - 2013
Virtual Instrumentation and Data Acquisition - PGICE - 2013Paramjeet Singh Jamwal
 
Reliability Engineering - PGICE - 2013
Reliability Engineering - PGICE - 2013Reliability Engineering - PGICE - 2013
Reliability Engineering - PGICE - 2013Paramjeet Singh Jamwal
 
Reliability Engineering - PGICE - 2012
Reliability Engineering - PGICE - 2012Reliability Engineering - PGICE - 2012
Reliability Engineering - PGICE - 2012Paramjeet Singh Jamwal
 
Introduction to Filters under labVIEW Environment
Introduction to Filters under labVIEW EnvironmentIntroduction to Filters under labVIEW Environment
Introduction to Filters under labVIEW EnvironmentParamjeet Singh Jamwal
 
Non Linear and Adaptive Control System JAN 2014
Non Linear and Adaptive Control System JAN 2014Non Linear and Adaptive Control System JAN 2014
Non Linear and Adaptive Control System JAN 2014Paramjeet Singh Jamwal
 
Microcontroller and Embedded System JAN 2014
Microcontroller and Embedded System JAN 2014Microcontroller and Embedded System JAN 2014
Microcontroller and Embedded System JAN 2014Paramjeet Singh Jamwal
 
Instrumentation System Design JAN 2014
Instrumentation System Design JAN 2014Instrumentation System Design JAN 2014
Instrumentation System Design JAN 2014Paramjeet Singh Jamwal
 
Instrumentation System Design | Assignment
Instrumentation System Design | AssignmentInstrumentation System Design | Assignment
Instrumentation System Design | AssignmentParamjeet Singh Jamwal
 
Introduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentIntroduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentParamjeet Singh Jamwal
 
Digital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentDigital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentParamjeet Singh Jamwal
 
Hydrology & Site Selection of Hydro Power Plant
Hydrology & Site Selection of Hydro Power PlantHydrology & Site Selection of Hydro Power Plant
Hydrology & Site Selection of Hydro Power PlantParamjeet Singh Jamwal
 

More from Paramjeet Singh Jamwal (20)

Introduction to MATLAB - I
Introduction to MATLAB - IIntroduction to MATLAB - I
Introduction to MATLAB - I
 
Fundamentals of Electric Drives - Electric Drives
Fundamentals of Electric Drives - Electric DrivesFundamentals of Electric Drives - Electric Drives
Fundamentals of Electric Drives - Electric Drives
 
DC Network Theory - Basic Electrical Engineering
DC Network Theory - Basic Electrical EngineeringDC Network Theory - Basic Electrical Engineering
DC Network Theory - Basic Electrical Engineering
 
Virtual Instrumentation and Data Acquisition - PGICE - 2013
Virtual Instrumentation and Data Acquisition - PGICE - 2013Virtual Instrumentation and Data Acquisition - PGICE - 2013
Virtual Instrumentation and Data Acquisition - PGICE - 2013
 
Reliability Engineering - PGICE - 2013
Reliability Engineering - PGICE - 2013Reliability Engineering - PGICE - 2013
Reliability Engineering - PGICE - 2013
 
Reliability Engineering - PGICE - 2012
Reliability Engineering - PGICE - 2012Reliability Engineering - PGICE - 2012
Reliability Engineering - PGICE - 2012
 
Introduction to Filters under labVIEW Environment
Introduction to Filters under labVIEW EnvironmentIntroduction to Filters under labVIEW Environment
Introduction to Filters under labVIEW Environment
 
Medical Image Compression
Medical Image CompressionMedical Image Compression
Medical Image Compression
 
Non Linear and Adaptive Control System JAN 2014
Non Linear and Adaptive Control System JAN 2014Non Linear and Adaptive Control System JAN 2014
Non Linear and Adaptive Control System JAN 2014
 
Microcontroller and Embedded System JAN 2014
Microcontroller and Embedded System JAN 2014Microcontroller and Embedded System JAN 2014
Microcontroller and Embedded System JAN 2014
 
Instrumentation System Design JAN 2014
Instrumentation System Design JAN 2014Instrumentation System Design JAN 2014
Instrumentation System Design JAN 2014
 
Instrumentation System Design | Assignment
Instrumentation System Design | AssignmentInstrumentation System Design | Assignment
Instrumentation System Design | Assignment
 
Digital signal processing JAN 2014
Digital signal processing JAN 2014Digital signal processing JAN 2014
Digital signal processing JAN 2014
 
Introduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentIntroduction to toolbox under matlab environment
Introduction to toolbox under matlab environment
 
Cardiovascular System
Cardiovascular SystemCardiovascular System
Cardiovascular System
 
Digital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentDigital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB Environment
 
Hydrology & Site Selection of Hydro Power Plant
Hydrology & Site Selection of Hydro Power PlantHydrology & Site Selection of Hydro Power Plant
Hydrology & Site Selection of Hydro Power Plant
 
Electromagnetic Field Theory May 2013
Electromagnetic Field Theory May 2013Electromagnetic Field Theory May 2013
Electromagnetic Field Theory May 2013
 
Digital Image Processing May 2013
Digital Image Processing May 2013Digital Image Processing May 2013
Digital Image Processing May 2013
 
Basic Electrical Engineering May 2013
Basic Electrical Engineering May 2013Basic Electrical Engineering May 2013
Basic Electrical Engineering May 2013
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Image Compression

  • 1. B.Tech (EEE) 2007-2011 Image Compression B.Tech (6th Semester) Electrical & Electronics Engineering College Of Engineering Roorkee
  • 2. Contents ... Image Compression Lossy Compression Lossless Compression JPEG Compression Algorithm DCT v/s DWT Applications of Image Processing Advantages /Disadvantages of Image Processing
  • 3. What is Image Compression ?  Application of data compression on digital images  Reduce redundancy of the image data Benefits of Image Compression  Store data efficiently  Transmit data efficiently
  • 4. Lossy Compression  Decompression retrieves data different from the original  Used to compress multimedia data  Streaming media and internet telephony Methods JPEG TIFF MNG PGF
  • 5. Original Image Before Compression
  • 7. Before Compression 186 KB 57053 26 KB 31760 After Compression Image Size Colour Used
  • 8. Lossless Compression  Exact reconstruction of original data  Executable programs and source codes  Data loss cant be tolerated Methods JPEG 2000 GIF PNG TIFF
  • 9. Original Image Before Compression
  • 11. Before Compression 186 KB 57053 136 KB 57053 After Compression Image Size Colour Used
  • 12. What is JPEG ?  Stands for Joint Photographics Experts Group  Lossy compression method  Mostly used by digital cameras & web usage  Not suited for drawing , textual and iconic graphics
  • 13. Basics of JPEG Compression  Human vision is insensitive to high spatial frequencies  JPEG Takes advantage of this by compressing high frequencies more coarsely and storing image as frequency data Losslessly compressed image, 150KB JPEG compressed, 14KB
  • 14. The JPEG Compression Algorithm  Divide image into 8x8 pixel blocks  Apply 2D Fourier Discrete Cosine Transform (FDCT) Transform  Apply coarse quantization to high spatial frequency components  Compress resulting data losslessly and store 8x8 pixel blocks FDCT Frequency Dependent quantization Quantization Table Zig-zag scan RLE Huffman Encoding output
  • 15. The JPEG File Structure Short name SOI Bytes 0xFFD8 Size none Name Start Of Image SOF0 0xFFC0 variable size Start Of Frame (Baseline DCT) SOF2 0xFFC2 variable size Start Of Frame (Progressive DCT) DHT 0xFFC4 variable size DQT 0xFFDB variable size DRI 0xFFDD 2 bytes SOS 0xFFDA variable size RSTn 0xFFD0 … 0xFFD7 none APPn 0xFFEn variable size Application-specific COM EOI 0xFFFE 0xFFD9 variable size none Comment End Of Image Define Huffman Table(s) Define Quantization Table(s) Define Restart Interval Start Of Scan Restart
  • 16. 1/7 : Divided into 8x8 blocks
  • 17. 1/7 : Divided into 8x8 blocks
  • 18. 2/7 : Convert RGB to YCbCr  Simple color space model: [R,G,B] per pixel  JPEG uses [Y, Cb, Cr] Model  Y (Brightness) = 0.299R + 0.587G + 0.114B Cb (Color blueness) = -0.1687R - 0.3313G + 0.5B + 128 Cr (Color redness) = 0.5R - 0.4187G - 0.0813B + 128
  • 19. 2/7 : Convert RGB to YCbCr
  • 20. 3/7 : Downsampling ( optional )  Y is taken every pixel , and Cb,Cr are taken for a block of 2x2 pixels  MCU(minimu m coded unit) : The smallest group of data units that is coded.  Data size reduces to a half immediately
  • 21. 4/7 : Apply DCT [ Discrete Cosine Transformation ] 2D DCT: 1D DCT:
  • 22. 4/7 : Apply DCT [ Discrete Cosine Transformation ] Shift operations From [0, 255] To [-128, 127] DCT Result
  • 23. 5/7 : Quantization Luminance Quantization Matrix Chrominance Quantization Matrix Each DCT coefficient F(u, v) is divided by the corresponding quantizer step-size parameter Q(u, v) in the quantization matrix and rounded to the nearest integer as
  • 24. 5/7 : Quantization [ Quality Factor ] Quality of the reconstructed image and the achieved compression can be controlled by a user by selecting a quality factor [ Q_JPEG ] :  Q_JPEG ranges between 1 to 100  When Q_JPEG is used, the entries in tables in previous slide is scaled by the factor alpha (α), defined as :  Q_JPEG is 100 for best reproduction
  • 25. 5/7 : Quantization DCT result Quantization Matrix Quantization result
  • 26. 6/7 : Zigzag reordering & RLE Quantization result
  • 27. 7/7 : Huffman encoding Values G 0 0 -1, 1 1 -3, -2, 2, 3 2 -7,-6,-5,-4,5,6,7 3 . 4 . 5 . . . . . . . . . . . . . . -32767..32767 15 Real saved values . 0,1 00, 01, 10, 11 000,001,010,011,100,101,110,111 . . . . . . . . .  RLC result: [0, -3] [0, 12] [0, 3]......EOB  After group number added: [0,2,00b] [0,4,1100b] [0,2,00b] ...... EOB  First Huffman coding (i.e. for [0,2,00b] ): [0, 2, 00b] => [100b, 00b] Input : 512 bits Output : 113 bits % Red : 22.07 %
  • 28. JPEG Compression Ratio 500KB image, minimum compression 40KB image, half compression 11KB image, max compression
  • 29. Effects of varying JPEG Compression Ratio Uncompressed image Half compression, Blurring around sharp edges Max compression, 8-pixel blocks apparent, large distortion in high-frequency areas
  • 30. DWT v/s DCT  Images containing sharp edges/continuous curves  Uses more optimal set of functions to represent sharp edges  Wavelets are finite in extent Different families of wavelets
  • 31. DWT v/s DCT Wavelet compression file size: 1861 bytes compression ratio - 105.6 JPEG compression file size: 1895 bytes compression ratio - 103.8 Source: http://www.barrt.ru/parshukov/about.htm.
  • 32. Applications of Image Processing Computer Vision Optical Sorting Face Detection Feature Detection Augmented Reality Remote Sensing Medical Image Processing
  • 33. Advantages/Disadvantages of Image Processing Post-processing High cost Easy Sharing Easy Retrieval Environment Friendly Multiple Use Disadvantages Advantages Easy Storage Extra Knowledge High Maintenance Standardization Shape/Size of detectors
  • 34. Any
  • 35. info4eee An initiative for B.Tech (EEE) Student