210 likes | 316 Views
Advanced JPEG. Dinesh Ganotra. Organizations Involved. Joint Photographic Experts Group ISO International Organization for Standards CCITT International Telegraph and Telephone Consultative Committee IEC International Electro-technical Commission. Recap. Contrast Sensitivity of the Eye.
E N D
Advanced JPEG DineshGanotra
Organizations Involved • Joint Photographic Experts Group • ISO International Organization for Standards • CCITT International Telegraph and Telephone Consultative Committee • IEC International Electro-technical Commission
Contrast Sensitivity of the Eye • At a 1 meter viewing distance an ideal digital image 40cm wide should have about 4,000 pixels. • The contrast sensitivity curve for luminance is different from chrominance.
Quantization Table Luminance Quantization Table Chrominance Quantization Table
ZERO SHIFT The 8-bit image data is zero-shifted by subtracting 128 from the data before the DCT is calculated. For 12-bit data the zero shift is accomplished by subtracting 2048. This reduces the internal precision requirement for DCT calculation.
DCT One multiplication and nine additions per coefficient
Entropy 001 0 10 11 100 101
lossless Sequential DPCM lossy Progressive DCT Huffman Arithmetic Hierarchical
Huffman Arithmetic Computationally Simpler Higher Performance ( 10%) code book adapts dynamically to the data being coded. Requires code tables to be known
Sequential Progressive encodes the image in two or more scans or passes through the data, first coding an approximation of the entire image with each succeeding scan. codes the image in a single scan or passes through the data. decoder follows the same order in decoding, first reconstructing the approximating of the image, and then adding finer detail with each succeeding scan The decoder necessarily follows the same order in decoding the data
magnitude bit plane AC band 3 DC band 1 AC band 2 AC band 1 2 1 AC band 4 AC band 5 DC band 4 AC band 6 0 Progressive
Hierarchical progressive coding with increasing spatial resolution between progressive stages
Y1 Y1 Y2 Y2 Y3 Y4 Cb1 Cb1 Cb2 Cb2 Cr1 Cr1 Cr2 Cr2 Y3 Y5 Y6 Y4 Y7 Y8 Cb3 Cb3 Cb4 Cb4 Cr3 Cr3 Cr4 Cr4 Y5 Y6 Y7 Y8 Data Unit Vertically interleaved data units Horizontally interleaved data units
Non interleaved, horizontal , and vertical interleaved Scan1 : Y1 , Y2 , Y3 , Y4 , Y5 , Y6 , Y7 , Y8 Scan2 : Cb1 , Cb2 , Cb3 , Cb4 Scan3 : Cr1 , Cr2 , Cr3 , Cr4 Scan1 : Y1 , Y2 , Cb1 , Cr1, Y3 , Y4 , Cb2 , Cr2, Y5 , Y6 , Cb3 , Cr3 , Y7 , Y8 , Cb4 , Cr4 Scan1 : Y1 , Y3 , Cb1 , Cr1, , Y2 , Y4 , Y5 , Y7 , Cb3 , Cr3 , Y6 , Y8 , Y7 , Y8 , Cb4 , Cr4
Example FFD8 FFC9 00 11 08 00 80 00 80 03 01 11 00 02 11 00 03 11 00 FFCC 00 06 00 10 10 05 FFDA 00 08 01 01 01 00 00 3F 00 … FFCC 00 06 01 10 11 05 FFDA 00 08 01 02 11 00 3F 00 … FFDA 00 08 01 03 11 00 3F 00 … FFD9
Markers Code Name Category FF01 TEM For temporary use in arithmetic coding FF02-FFBF RES Reserved FFC0 SOF0Nondifferential Huffman –coding frames Baseline DCT FFC1 SOF1Nondifferential Huffman –coding frames Extended sequential DCT FFC2 SOF2Nondifferential Huffman –coding frames Progressive DCT FFC3 SOF3Nondifferential Huffman –coding frames Lossless sequential FFC4 DHT Define Huffman Table(s) FFC5 SOF5 Differential Huffman –coding frames differential sequential DCT FFC6 SOF6 Differential Huffman –coding frames differential progressive DCT FFC7 SOF7 Differential Huffman –coding frames differential lossless FFC8 JPG Reserved for JPEG extension FFC9 SOF9Nondifferential arithmetic–coding frames Extended sequential DCT FFCA SOF10Nondifferential arithmetic–coding frames Progressive DCT FFCB SOF11Nondifferential arithmetic–coding frames Lossless sequential
Markers Cont.. FFCC DAC Define Arithmatic Coding FFCD SOF13 Differential arithmetic- coding frames differential sequential FFCE SOF14 Differential arithmetic- coding frames differential progressive FFCF SOF15 Differential arithmetic- coding frames differential lossless FFD0-FFD7 RSTm Restart with modulo 8 counter m FFD8 SOI Start of image FFD9 EOI End of Image FFDA SOS Start of Scan FFDB DQT Define quantization table FFDC DNL Define number of lines FFDD DRI Define restart interval FFDE DHP Define Hierarchical progression FFDF EXP Expand reference images FFE0-FFEF APPn Reserved for application use (two different applications may have conflicting usage of APPn) FFF0-FFFD JPGn Reserved for JPEG extension FFFE COM Comment
Frames and Scans Frame Header SOFn Parameter Symbol Size Marker ( FFC0-3, 5-7, 9-B,D-F) SOFn 16 Frame header length Lf 16 Sample precision P 8 Number of lines Y 16 Number of samples per line X 16 Number of components in frame Nf 8 Frame component specification Component identifier Ci 8 Horizontal sampling factor Hi 4 Vertical sampling factor Vi 4 Quantization table destination selector Tqi 8 The above example shows a three component system. YCrCbwith identical sampling for all components in the vertical direction and twice as many Y samples as Cr or Cb samples in the horizontal direction. Let the first component use quantization table 0 and the rest use quantization table 1. If Y, Cr and Cb are numbered 0, 1, and 2 respectively, the components specification is as given above.
Other Header Structures Scan Header DHT Marker Segment DAC Marker Segment DQT Marker Segment Restart Segment
References • JPEG still image data compression standard, • William B Pennebaker, JL Mitchell, • VNR , International Thomson Publishing Inc.