SlideShare une entreprise Scribd logo
1  sur  19
Lossy Compression
By:
Mahmoud Hikmet Bzhar Omer
Supervisor:
Dr.Roojwan Sdiq
Overview
• What's Comparession ?
• What’s lossless and lossy compression ?
• What’s JPEG?
• The Major Steps in JPEG Coding involve:
 Transform RGB to YIQ or YUV and subsample color.
 DCT(Discrete Cosine Transformation).
 Quantization.
 Zig-zag ordering
 DPCM on DC component
 Run-length encoding.
 Entropy coding.
What is Comparession ?
• Compression is the reduction in size of data
in order to save space or transmission time.
Learn how files are compressed .
What’s lossless and lossy
compression ?
• Lossless: The compression of a file, all original
data can be recovered when the file is
uncompressed.
• Lossy : -The compressed data is not the
same as the original data, but a close
approximation of it.
What is JPEG?
• "Joint Photographic Expert Group" -- an
international standard in 1992.
• Works with colour and greyscale images, Many
applications e.g., satellite, medical, ..
JPEG compression involves the following:
DCT : Discrete Cosine Transform
• DCT converts the information contained in a block(8x8)
of pixels from spatial domain to the frequency domain.
1-D DCT: 1-D Inverese DCT:





1N
0n
2N
1)(2n
f(n)cos
2
a(u))F( 
 




1N
0
2N
1)(2n
)cosF(
2
a(u))(f’


n
 0p1a(p)
2
1a(0)


Examplesubimage2*2
154 123
192 186
D
Subtract 128 from each value to convert to signed
26 -5
64 58
D
First Row= 2
1
secondRow= 2N
1)(2n
cos

N/2
1- = 0.7071
2-
2
1
N*2
1)(2n
cos

N/2
D(1,0)= 2*2
*1)0*(2
cos
1
2/2
D(1,0)= 4
cos

D(1,0)=0.7071
D(1,1)= 2*2
*1)1*(2
cos
1
2/2
D(1,1)= 4
cos
3
D(1,1)=-0.7071
0.7071 0.7071
0.7071 -0.7071
T
0.7071 0.7071
0.7071 -0.7071
0.7071 0.7071
0.7071 -0.7071
26 -5
64 58* *
T D -T
63.639 33.234
-26.87 -40.305
0.7071 0.7071
0.7071 -0.7071*
68.5 21.5
-47.5 9.5DCT=
Quantization:
• The quantization step is the main source for loss in JPEG
compression
• Encoder: Each value in the current block is divided by 16
and rounded down to create the quantised block.
• Round(DCT/Q)
68.5 21.5
-47.5 9.5
16 11
12 12
Q
4 2
-4 1
4 2
-4 1
QDCT
Quantization:
• The quantization step is the main source for loss in JPEG
compression.
• Decoder: Each value in the quantised block is multiplied
by quntize block.
4 2
-4 1
QDCT
16 11
12 12*
64 22
-48 12
Q-1
• DCT-1=round(T*Q-1*T)+128
DCT-inverse
0.7071 0.7071
0.7071 -0.7071
0.7071 0.7071
0.7071 -0.7071
26 -5
64 58
T Q-1 -T
* *
11.314 24.041
79.195 7.071 *
0.7071 0.7071
0.7071 -0.7071
=
=
= 25 -9
61 51
+
128 128
128 128
153 119
189 179
=
154 123
192 186
D
- 153 119
189 179
DCT-1
1 4
3 7
=
Zig-Zag Scan
• Why? to group low frequency coefficients in top of vector and high
frequency coefficients at the bottom
−26, −3, 0, −3, −2, −6, 2, −4, 1, −4, 1, 1, 5, 1, 2, −1, 1, −1, 2, 0, 0, 0,
0, 0, −1, −1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, EOB
• The 1x64 vectors have a lot of zeros in them, more so towards the end
of the vector.
• Higher up entries in the vector capture higher frequency (DCT) components
which tend to be capture less of the content.
• Could have been as a result of using a quantization table
• Encode a series of 0s as a (skip,value) pair, where skip is the number of
zeros and value is the next non-zero component.
• Send (0,0) as end-of-block sentinel value.
. . .
1x64
0 0 0 0 0 1 1 0 0 0 0 0
5,1
0 0
7,2
0 . . .2
RLEon AC Components
Run-length encode:
−26, −3, 0, −3, −2, −6, 2, −4, 1, −4, {2 x 1}, 5, 1, 2, −1, 1, −1, 2, {5 x
0} , −1, −1,
• Is based on the frequency of occurance of data item(pixel in image).
• The principle is to use a lower number of bits to encode the data occurs more
frequently.
H(x)= 𝑖=1
𝑛
𝐿𝑃𝑥𝑖
𝑃𝑥𝑖=log 2 xi
𝐿 number of bit for each character.
𝑃𝑥𝑖 entropy for each character.
Huffman Coding
Example
Symbol Xi sorting Xi Symol Code number ofbit
______ __ ______ _____ _____ ___________
A 0.3 0.3 A 00 2
B 0.2 0.23 C 01 2
C 0.23 0.2 B 11 2
D 0.07 0.15 E 010 3
E 0.15 0.07 D 0110 4
F 0.05 0.05 F 1110 4
H(x)= 𝑖=1
𝑛
𝐿𝑃𝑥𝑖
=2log 2 0.3 + 2log 2 0.23 + 2log 2 0.2 + 3log 2 0.15 +
4log 2 0.07 + 4log 2 0.05= -0.21
Thank you

Contenu connexe

Tendances

Chapter 6 : VIDEO
Chapter 6 : VIDEOChapter 6 : VIDEO
Chapter 6 : VIDEOazira96
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
Image compression standards
Image compression standardsImage compression standards
Image compression standardskirupasuchi1996
 
video compression techique
video compression techiquevideo compression techique
video compression techiqueAshish Kumar
 
Standards De Compression Audio Et VidéO
Standards De Compression Audio Et VidéOStandards De Compression Audio Et VidéO
Standards De Compression Audio Et VidéObriantais
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGEazira96
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data CompressionPratik Pradhan
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression BasicsSanjiv Malik
 
Multimedia tools (sound)
Multimedia tools (sound)Multimedia tools (sound)
Multimedia tools (sound)dhruv patel
 
Image file formats
Image file formatsImage file formats
Image file formatsBob Watson
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson
 

Tendances (20)

Chapter 6 : VIDEO
Chapter 6 : VIDEOChapter 6 : VIDEO
Chapter 6 : VIDEO
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
Jpeg2000
Jpeg2000Jpeg2000
Jpeg2000
 
video compression techique
video compression techiquevideo compression techique
video compression techique
 
Standards De Compression Audio Et VidéO
Standards De Compression Audio Et VidéOStandards De Compression Audio Et VidéO
Standards De Compression Audio Et VidéO
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGE
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
 
Multimedia compression
Multimedia compressionMultimedia compression
Multimedia compression
 
Digital video
Digital videoDigital video
Digital video
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression Basics
 
Digital video
Digital videoDigital video
Digital video
 
Data compression
Data compression Data compression
Data compression
 
Multimedia tools (sound)
Multimedia tools (sound)Multimedia tools (sound)
Multimedia tools (sound)
 
H.264 vs HEVC
H.264 vs HEVCH.264 vs HEVC
H.264 vs HEVC
 
Text compression
Text compressionText compression
Text compression
 
Image file formats
Image file formatsImage file formats
Image file formats
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video Compression
 
Image Compression
Image CompressionImage Compression
Image Compression
 

Similaire à lossy compression JPEG

CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfMohammadAzreeYahaya
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.pptHarisMasood20
 
introduction to jpeg for image proce.ppt
introduction to jpeg for image proce.pptintroduction to jpeg for image proce.ppt
introduction to jpeg for image proce.pptnaghamallella
 
Ibtc dwt hybrid coding of digital images
Ibtc dwt hybrid coding of digital imagesIbtc dwt hybrid coding of digital images
Ibtc dwt hybrid coding of digital imagesZakaria Zubi
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image CompressionMathankumar S
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compressionZaabir Ali
 
MPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video EncodingMPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video EncodingChristian Kehl
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?Prabhat Kumar
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compressionmurugan hari
 
Video Compression Basics by sahil jain
Video Compression Basics by sahil jainVideo Compression Basics by sahil jain
Video Compression Basics by sahil jainSahil Jain
 
DC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdfDC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdfssuser1bd081
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compressionM.k. Praveen
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.pptnaghamallella
 

Similaire à lossy compression JPEG (20)

Data compression
Data compressionData compression
Data compression
 
CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdf
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Mmclass4
Mmclass4Mmclass4
Mmclass4
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
introduction to jpeg for image proce.ppt
introduction to jpeg for image proce.pptintroduction to jpeg for image proce.ppt
introduction to jpeg for image proce.ppt
 
Ibtc dwt hybrid coding of digital images
Ibtc dwt hybrid coding of digital imagesIbtc dwt hybrid coding of digital images
Ibtc dwt hybrid coding of digital images
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
 
MPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video EncodingMPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video Encoding
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?
 
Source coding
Source codingSource coding
Source coding
 
Ch7 031102
Ch7 031102Ch7 031102
Ch7 031102
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Video Compression Basics by sahil jain
Video Compression Basics by sahil jainVideo Compression Basics by sahil jain
Video Compression Basics by sahil jain
 
Steganography Part 2
Steganography Part 2Steganography Part 2
Steganography Part 2
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
 
DC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdfDC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdf
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.ppt
 

Dernier

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Dernier (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 

lossy compression JPEG

  • 1. Lossy Compression By: Mahmoud Hikmet Bzhar Omer Supervisor: Dr.Roojwan Sdiq
  • 2. Overview • What's Comparession ? • What’s lossless and lossy compression ? • What’s JPEG? • The Major Steps in JPEG Coding involve:  Transform RGB to YIQ or YUV and subsample color.  DCT(Discrete Cosine Transformation).  Quantization.  Zig-zag ordering  DPCM on DC component  Run-length encoding.  Entropy coding.
  • 3. What is Comparession ? • Compression is the reduction in size of data in order to save space or transmission time. Learn how files are compressed .
  • 4. What’s lossless and lossy compression ? • Lossless: The compression of a file, all original data can be recovered when the file is uncompressed. • Lossy : -The compressed data is not the same as the original data, but a close approximation of it.
  • 5. What is JPEG? • "Joint Photographic Expert Group" -- an international standard in 1992. • Works with colour and greyscale images, Many applications e.g., satellite, medical, ..
  • 6. JPEG compression involves the following:
  • 7. DCT : Discrete Cosine Transform • DCT converts the information contained in a block(8x8) of pixels from spatial domain to the frequency domain. 1-D DCT: 1-D Inverese DCT:      1N 0n 2N 1)(2n f(n)cos 2 a(u))F(        1N 0 2N 1)(2n )cosF( 2 a(u))(f’   n  0p1a(p) 2 1a(0)  
  • 8. Examplesubimage2*2 154 123 192 186 D Subtract 128 from each value to convert to signed 26 -5 64 58 D First Row= 2 1 secondRow= 2N 1)(2n cos  N/2
  • 9. 1- = 0.7071 2- 2 1 N*2 1)(2n cos  N/2 D(1,0)= 2*2 *1)0*(2 cos 1 2/2 D(1,0)= 4 cos  D(1,0)=0.7071 D(1,1)= 2*2 *1)1*(2 cos 1 2/2 D(1,1)= 4 cos 3 D(1,1)=-0.7071 0.7071 0.7071 0.7071 -0.7071 T
  • 10. 0.7071 0.7071 0.7071 -0.7071 0.7071 0.7071 0.7071 -0.7071 26 -5 64 58* * T D -T 63.639 33.234 -26.87 -40.305 0.7071 0.7071 0.7071 -0.7071* 68.5 21.5 -47.5 9.5DCT=
  • 11. Quantization: • The quantization step is the main source for loss in JPEG compression • Encoder: Each value in the current block is divided by 16 and rounded down to create the quantised block. • Round(DCT/Q) 68.5 21.5 -47.5 9.5 16 11 12 12 Q 4 2 -4 1 4 2 -4 1 QDCT
  • 12. Quantization: • The quantization step is the main source for loss in JPEG compression. • Decoder: Each value in the quantised block is multiplied by quntize block. 4 2 -4 1 QDCT 16 11 12 12* 64 22 -48 12 Q-1
  • 13. • DCT-1=round(T*Q-1*T)+128 DCT-inverse 0.7071 0.7071 0.7071 -0.7071 0.7071 0.7071 0.7071 -0.7071 26 -5 64 58 T Q-1 -T * * 11.314 24.041 79.195 7.071 * 0.7071 0.7071 0.7071 -0.7071 = = = 25 -9 61 51 + 128 128 128 128 153 119 189 179 =
  • 14. 154 123 192 186 D - 153 119 189 179 DCT-1 1 4 3 7 =
  • 15. Zig-Zag Scan • Why? to group low frequency coefficients in top of vector and high frequency coefficients at the bottom −26, −3, 0, −3, −2, −6, 2, −4, 1, −4, 1, 1, 5, 1, 2, −1, 1, −1, 2, 0, 0, 0, 0, 0, −1, −1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, EOB
  • 16. • The 1x64 vectors have a lot of zeros in them, more so towards the end of the vector. • Higher up entries in the vector capture higher frequency (DCT) components which tend to be capture less of the content. • Could have been as a result of using a quantization table • Encode a series of 0s as a (skip,value) pair, where skip is the number of zeros and value is the next non-zero component. • Send (0,0) as end-of-block sentinel value. . . . 1x64 0 0 0 0 0 1 1 0 0 0 0 0 5,1 0 0 7,2 0 . . .2 RLEon AC Components Run-length encode: −26, −3, 0, −3, −2, −6, 2, −4, 1, −4, {2 x 1}, 5, 1, 2, −1, 1, −1, 2, {5 x 0} , −1, −1,
  • 17. • Is based on the frequency of occurance of data item(pixel in image). • The principle is to use a lower number of bits to encode the data occurs more frequently. H(x)= 𝑖=1 𝑛 𝐿𝑃𝑥𝑖 𝑃𝑥𝑖=log 2 xi 𝐿 number of bit for each character. 𝑃𝑥𝑖 entropy for each character. Huffman Coding
  • 18. Example Symbol Xi sorting Xi Symol Code number ofbit ______ __ ______ _____ _____ ___________ A 0.3 0.3 A 00 2 B 0.2 0.23 C 01 2 C 0.23 0.2 B 11 2 D 0.07 0.15 E 010 3 E 0.15 0.07 D 0110 4 F 0.05 0.05 F 1110 4 H(x)= 𝑖=1 𝑛 𝐿𝑃𝑥𝑖 =2log 2 0.3 + 2log 2 0.23 + 2log 2 0.2 + 3log 2 0.15 + 4log 2 0.07 + 4log 2 0.05= -0.21