SlideShare uma empresa Scribd logo
1 de 15
The Lossless JPEG standard
• y=(a+b)/2 = 145
• r=145-180=-35
• Category (r) = 6, Magnitude (r) = 100011
• 1’s complement of cat (r) = 011100
• Rep(35)={6,011100}
• Let Huff. code(6) = 1110
• Code(-35)=1110011100
100 191
100 180
MSB=0 fpr
numbers < 0
10 bits
The JPEG-LS standard
• Loco project (http://www.hpl.hp.com/loco/)
• Near-lossless encoding
• decoder output does not differ from the input
by no more than a pre-specified value
• JPEG-LS coder
• Context modeling – encoding of a pixel depends on the
previous pixels
• Run-length encoder – for smooth parts of the image
• Predictor – like in the lossless JPEG scheme
• Error Coder – to reconstruct the difference between the
prediction and the signal
The JPEG-LS standard
• Context Model
• two probability models: flat areas and edge-areas
• compute d1=d-a, d2=a-c, d3=c-b
• quantize d1, d2, d3 to Q1, Q2, Q3 using thresholds
T1, T2, T3. For 8-bit images they are 3, 7, 21
• any Q can take up to 9 possible values based on
the threshold interval it is in
• This produces 93
-1=728 combinations for
{Q1,Q2,Q3}, or 364 using symmetry
c a d
b X
The JPEG-LS standard
• Run-mode coder
• If gradients are close to 0, the encoder gets into a run-mode
• So long as |x-b| ≤ ε, the encoder reads subsequent samples
• Then it returns the run-length
• If end-of-line is reached, it encodes the last sample
• At the pixel x the predictor computes prediction error e=y-
x where
min(a,b) if c ≥ max(a,b)
y= max(a,b) if c ≤ min(a,b)
a+b-c
• Remove any prediction bias
• Remap e to e′ = 2e for positive e and –2e-1 for negative e
• Encode e′ with Golomb-Rice encoding
The JPEG-LS standard
• The parameter k for Golomb-Rice encoding is
obtained by
• k =
• A[i]: accumulated sum of prediction errors
• N[i]: number of prediction residuals seen in context i
• Removal of prediction bias
• Idea: the prediction error must follow a 2-sided
geometric distribution
• Computed using A[i] – how?
• B[i], sum of errors after correction and C[i], the
correction itself are also stored






][
][
log 2
iN
iA
Lempel-Ziv-Welch Compression
• Non-prefix encoding scheme
• Algorithm
• Step 1: Initialize string table with basic characters
• Step 2: Initialize prefix […] ← empty
repeat until no character left
• Step 3: Create variable currentStream by reading the next character C
from characterstream
• Step 4: Check if currentString in the string table
• If yes then […] ← […] C; go to step 3
• Else add to […] C the string table
• Output code for [...] to codestream
• […] ← next character
• Go to step 3
Lempel-Ziv-Welch Compression
• Take a 4 character alphabet: p q r s
• Consider a message “p q p r p q p”
• Construct String table
• 0:p, 1:q, 2:r, 3:s
• Initialize prefix
• prefix=[]
• currentstring = [] p
• This is in table, so prefix =[p]
• currentstring =[p] q
• Not in table, update table, and output code for p 0 →
• prefix=[q], code character : 0:p, 1:q, 2:r, 3:s, 4:pq
• currentstring =[q]p
• Not in table, update table, and output code for q 1 →
• Prefix=[p], code character : 0:p, 1:q, 2:r, 3:s, 4:pq, 5:qp
Representing digital raster
images
• Issues:
• Raw versus compressed
• Single-image versus multi- image
• Color representation
• Singe versus multi-resolution
The GIF Format
A file generated from the grammar
<GIF Data Stream> ::= Header <Logical Screen><Data>* Trailer
<Logical Stream> ::= Logical Screen Descriptor [Global Color Table]
<Data> ::= <Graphic Block> <Special Purpose Block>
<Graphic Block> ::= [Graphic Control Extension] <Graphic Rendering Block>
<Graphic Rendering Block> ::= <Table-Based Image> | Plain Text Extension
<Table-Based Image> ::= Image Descriptor [Local Color Table] Image Data
<Special Purpose Block> ::= Application Extension | Comment Extension
Control block
Not used for
decoding
The GIF Format
• Structure of a block
• Block Size:byte
• Data Value: byte
• Logical Screen Descriptor
• Logical Screen Width
• Logical Screen Height
• Packed Bits
• Global Color Table Flag
• Color Resolution: number of bits per primary color - 1
• Sort Flag
• Size of Global Color Table
• Background Color Index
• Pixel Aspect Ratio
The GIF Format
• Image Descriptor
• Image Separator
• Image Left Position
• Image Top Position
• Image Width
• Image Height
• Packed Fields
• Local Color Table Flag
• Interlace Flag: Interlace patter is 4-pass
• Sort Flag
• Size of Local Color Table
The GIF Format
• Table-Based Image Data
• LZW Minimum Code Size: same as number of color bits
• Compression Steps
– Establish Code Size
– Perform Compression
– Build Series of Bytes
– Package bytes into blocks
• Image Data in sub-blocks of at most 255 bytes
• Graphic Control Extension
• Extension Introducer
• Graphic Control Labrl
• Block Size
• Packed Bits
• Disposal method, user input flag, transparent color flag
• Delay Time
• Transparent Color Index
Network-Aware Formats
• A tradeoff problem
• Compression efficiency vs. progressive transmission
performance
• Network factors
• Packet loss
• Asynchronous arrival of packets at destination
• Progressive Transmission Factors
• % of picture visible as a function of time
• Same given a certain amount of packet loss
Network-Aware Formats
• Recent Research in University of Delaware
• NETCICATS project
(http://www.eecis.udel.edu/~iren/netcicats.html)
• Primary idea
• Break the picture into maximum transmission unit (MTU)
sized chunks that a link layer will carry without the IP layer
further fragmenting it
• The MTU sized picture fragments (also called application data
units) should be “self contained” to the extent possible
The GIFNC Proposal
• The Screen Descriptor
• An ADU could be a color map or data
• An ADU has an extra byte that identifies
• The image number of an image
• A local color map and the image identifier to which it belongs
• If an ADU is a color map
• The start and end indices of the color map
• The image descriptor
• The image is always interlaced
• L and G flags for the last image and all ADUs of the last image
respetively

Mais conteúdo relacionado

Mais procurados

Analysis of different bit carry look ahead adder using verilog code 2
Analysis of different bit carry look ahead adder using verilog code 2Analysis of different bit carry look ahead adder using verilog code 2
Analysis of different bit carry look ahead adder using verilog code 2
IAEME Publication
 

Mais procurados (10)

Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adder
 
Microprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operationMicroprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operation
 
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption DecryptionVLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adder
 
Digital logic design1
Digital logic design1Digital logic design1
Digital logic design1
 
Analysis of different bit carry look ahead adder using verilog code 2
Analysis of different bit carry look ahead adder using verilog code 2Analysis of different bit carry look ahead adder using verilog code 2
Analysis of different bit carry look ahead adder using verilog code 2
 
Pda
PdaPda
Pda
 
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
 
07f03 carryskip
07f03 carryskip07f03 carryskip
07f03 carryskip
 
Sequential circuit multiplier
Sequential circuit multiplierSequential circuit multiplier
Sequential circuit multiplier
 

Semelhante a Mmclass3

Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
Daniel Cahall
 

Semelhante a Mmclass3 (20)

Intro_OpenCV.ppt
Intro_OpenCV.pptIntro_OpenCV.ppt
Intro_OpenCV.ppt
 
Mmclass4
Mmclass4Mmclass4
Mmclass4
 
image compresson
image compressonimage compresson
image compresson
 
Image compression
Image compressionImage compression
Image compression
 
Mmclass5b
Mmclass5bMmclass5b
Mmclass5b
 
Cryptography
CryptographyCryptography
Cryptography
 
Image style transfer & AI on App
Image style transfer & AI on AppImage style transfer & AI on App
Image style transfer & AI on App
 
Jpeg
JpegJpeg
Jpeg
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
MATLAB & Image Processing
MATLAB & Image ProcessingMATLAB & Image Processing
MATLAB & Image Processing
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakov
 
Prinsip gambar digital
Prinsip gambar digitalPrinsip gambar digital
Prinsip gambar digital
 
Archive enabling tagging using progressive barcodes
Archive enabling tagging using progressive barcodesArchive enabling tagging using progressive barcodes
Archive enabling tagging using progressive barcodes
 
lossy compression JPEG
lossy compression JPEGlossy compression JPEG
lossy compression JPEG
 
DC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdfDC04 Image Compression Standards.pdf
DC04 Image Compression Standards.pdf
 
Overview of graphics systems
Overview of  graphics systemsOverview of  graphics systems
Overview of graphics systems
 
Mmclass5
Mmclass5Mmclass5
Mmclass5
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphics
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 

Mais de Hassan Dar (9)

Mmclass9
Mmclass9Mmclass9
Mmclass9
 
Mmclass6
Mmclass6Mmclass6
Mmclass6
 
Mmclass2
Mmclass2Mmclass2
Mmclass2
 
Mmclass1
Mmclass1Mmclass1
Mmclass1
 
Lecture1
Lecture1Lecture1
Lecture1
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Ch4
Ch4Ch4
Ch4
 
Msd ch2 issues in multimedia
Msd ch2 issues in multimediaMsd ch2 issues in multimedia
Msd ch2 issues in multimedia
 
Mmclass10
Mmclass10Mmclass10
Mmclass10
 

Último

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 

Último (20)

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 

Mmclass3

  • 1. The Lossless JPEG standard • y=(a+b)/2 = 145 • r=145-180=-35 • Category (r) = 6, Magnitude (r) = 100011 • 1’s complement of cat (r) = 011100 • Rep(35)={6,011100} • Let Huff. code(6) = 1110 • Code(-35)=1110011100 100 191 100 180 MSB=0 fpr numbers < 0 10 bits
  • 2. The JPEG-LS standard • Loco project (http://www.hpl.hp.com/loco/) • Near-lossless encoding • decoder output does not differ from the input by no more than a pre-specified value • JPEG-LS coder • Context modeling – encoding of a pixel depends on the previous pixels • Run-length encoder – for smooth parts of the image • Predictor – like in the lossless JPEG scheme • Error Coder – to reconstruct the difference between the prediction and the signal
  • 3. The JPEG-LS standard • Context Model • two probability models: flat areas and edge-areas • compute d1=d-a, d2=a-c, d3=c-b • quantize d1, d2, d3 to Q1, Q2, Q3 using thresholds T1, T2, T3. For 8-bit images they are 3, 7, 21 • any Q can take up to 9 possible values based on the threshold interval it is in • This produces 93 -1=728 combinations for {Q1,Q2,Q3}, or 364 using symmetry c a d b X
  • 4. The JPEG-LS standard • Run-mode coder • If gradients are close to 0, the encoder gets into a run-mode • So long as |x-b| ≤ ε, the encoder reads subsequent samples • Then it returns the run-length • If end-of-line is reached, it encodes the last sample • At the pixel x the predictor computes prediction error e=y- x where min(a,b) if c ≥ max(a,b) y= max(a,b) if c ≤ min(a,b) a+b-c • Remove any prediction bias • Remap e to e′ = 2e for positive e and –2e-1 for negative e • Encode e′ with Golomb-Rice encoding
  • 5. The JPEG-LS standard • The parameter k for Golomb-Rice encoding is obtained by • k = • A[i]: accumulated sum of prediction errors • N[i]: number of prediction residuals seen in context i • Removal of prediction bias • Idea: the prediction error must follow a 2-sided geometric distribution • Computed using A[i] – how? • B[i], sum of errors after correction and C[i], the correction itself are also stored       ][ ][ log 2 iN iA
  • 6. Lempel-Ziv-Welch Compression • Non-prefix encoding scheme • Algorithm • Step 1: Initialize string table with basic characters • Step 2: Initialize prefix […] ← empty repeat until no character left • Step 3: Create variable currentStream by reading the next character C from characterstream • Step 4: Check if currentString in the string table • If yes then […] ← […] C; go to step 3 • Else add to […] C the string table • Output code for [...] to codestream • […] ← next character • Go to step 3
  • 7. Lempel-Ziv-Welch Compression • Take a 4 character alphabet: p q r s • Consider a message “p q p r p q p” • Construct String table • 0:p, 1:q, 2:r, 3:s • Initialize prefix • prefix=[] • currentstring = [] p • This is in table, so prefix =[p] • currentstring =[p] q • Not in table, update table, and output code for p 0 → • prefix=[q], code character : 0:p, 1:q, 2:r, 3:s, 4:pq • currentstring =[q]p • Not in table, update table, and output code for q 1 → • Prefix=[p], code character : 0:p, 1:q, 2:r, 3:s, 4:pq, 5:qp
  • 8. Representing digital raster images • Issues: • Raw versus compressed • Single-image versus multi- image • Color representation • Singe versus multi-resolution
  • 9. The GIF Format A file generated from the grammar <GIF Data Stream> ::= Header <Logical Screen><Data>* Trailer <Logical Stream> ::= Logical Screen Descriptor [Global Color Table] <Data> ::= <Graphic Block> <Special Purpose Block> <Graphic Block> ::= [Graphic Control Extension] <Graphic Rendering Block> <Graphic Rendering Block> ::= <Table-Based Image> | Plain Text Extension <Table-Based Image> ::= Image Descriptor [Local Color Table] Image Data <Special Purpose Block> ::= Application Extension | Comment Extension Control block Not used for decoding
  • 10. The GIF Format • Structure of a block • Block Size:byte • Data Value: byte • Logical Screen Descriptor • Logical Screen Width • Logical Screen Height • Packed Bits • Global Color Table Flag • Color Resolution: number of bits per primary color - 1 • Sort Flag • Size of Global Color Table • Background Color Index • Pixel Aspect Ratio
  • 11. The GIF Format • Image Descriptor • Image Separator • Image Left Position • Image Top Position • Image Width • Image Height • Packed Fields • Local Color Table Flag • Interlace Flag: Interlace patter is 4-pass • Sort Flag • Size of Local Color Table
  • 12. The GIF Format • Table-Based Image Data • LZW Minimum Code Size: same as number of color bits • Compression Steps – Establish Code Size – Perform Compression – Build Series of Bytes – Package bytes into blocks • Image Data in sub-blocks of at most 255 bytes • Graphic Control Extension • Extension Introducer • Graphic Control Labrl • Block Size • Packed Bits • Disposal method, user input flag, transparent color flag • Delay Time • Transparent Color Index
  • 13. Network-Aware Formats • A tradeoff problem • Compression efficiency vs. progressive transmission performance • Network factors • Packet loss • Asynchronous arrival of packets at destination • Progressive Transmission Factors • % of picture visible as a function of time • Same given a certain amount of packet loss
  • 14. Network-Aware Formats • Recent Research in University of Delaware • NETCICATS project (http://www.eecis.udel.edu/~iren/netcicats.html) • Primary idea • Break the picture into maximum transmission unit (MTU) sized chunks that a link layer will carry without the IP layer further fragmenting it • The MTU sized picture fragments (also called application data units) should be “self contained” to the extent possible
  • 15. The GIFNC Proposal • The Screen Descriptor • An ADU could be a color map or data • An ADU has an extra byte that identifies • The image number of an image • A local color map and the image identifier to which it belongs • If an ADU is a color map • The start and end indices of the color map • The image descriptor • The image is always interlaced • L and G flags for the last image and all ADUs of the last image respetively