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

image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compressionmurugan hari
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic codingVikas Goyal
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filterarulraj121
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & DescriptorsPundrikPatel
 
Image compression standards
Image compression standardsImage compression standards
Image compression standardskirupasuchi1996
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersSuhaila Afzana
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image CompressionMathankumar S
 
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
 
Lossless predictive coding
Lossless predictive codingLossless predictive coding
Lossless predictive codingFahad Israr
 

What's hot (20)

JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic coding
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filter
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & Descriptors
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
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
 
Noise Models
Noise ModelsNoise Models
Noise Models
 
Lossless predictive coding
Lossless predictive codingLossless predictive coding
Lossless predictive coding
 
Psuedo color
Psuedo colorPsuedo color
Psuedo color
 

Similar to Image Compression

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
 
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
 
steganography based image compression
steganography based image compressionsteganography based image compression
steganography based image compressionINFOGAIN PUBLICATION
 
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...inventionjournals
 

Similar to Image Compression (20)

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
 
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
 
steganography based image compression
steganography based image compressionsteganography based image compression
steganography based image compression
 
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
 
JPEG
JPEGJPEG
JPEG
 

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

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 

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