Image Blending, Image Pyramids Projective Geometry Image ...
MMC_07_Still image compression.pdf
Transcript of MMC_07_Still image compression.pdf
-
8/10/2019 MMC_07_Still image compression.pdf
1/33
-
8/10/2019 MMC_07_Still image compression.pdf
2/33
2
Outlines
Bi-level image compression
G3/G4, JBIG, JBIG2
JPEG
JPEG-LS JPEG2000 (in other lectures)
-
8/10/2019 MMC_07_Still image compression.pdf
3/33
3
Bi-level Image Compression
Standards ITU G3/G4: Most widely used image compression standards for FAX
Cannot efficiently deal with digital haltfone image G3:
Non-adaptive, 1-D run length coding Last K-1 lines of each group of K lines can be optionally 2-D run-length coded. Compression ratio 15:1
G4: Only 2-D run length coding allowed 30% better compression by removing error recovery from G3
JBIG: 30% better than G4
Digital Half toning 8:1 compression Deal with digital halftones Adaptive arithmetic Coding Adaptive templates for halftones Lossless binary and low precision gray level (< 6 bits per pixel) Progressive transmission (pyramid transmission)
offers progressive encoding/decoding capability, the resulting bitstream contains a set ofprogressively higher resolution images
one bit/pixel using bit-plane coding
JBIG2 Allow lossy compression Model-based coding
-
8/10/2019 MMC_07_Still image compression.pdf
4/33
4
Color Image Compression
Intended to be blank
-
8/10/2019 MMC_07_Still image compression.pdf
5/33
5
JPEG-LS JPEG-LS is in the current ISO/ITU standard for lossless or near
lossless" compression of continuous tone images.
It is part of a larger ISO effort aimed at better compression ofmedical images.
Uses the LOCO-I (LOw COmplexity LOssless Compression for
Images) algorithm proposed by Hewlett-Packard.
Motivated by the observation that complexity reduction is oftenmore important than small increases in compression offered bymore complex algorithms.
Main Advantage: Low complexity!
-
8/10/2019 MMC_07_Still image compression.pdf
6/33
6
JPEG-LS The LOCO-I algorithm makes uses of context modeling.
The idea of context modeling is to take advantage of the structure within the input source { theconditional probabilities}.
Example for context model Binary source P(0) = 0.4, P(1) = 0.6 0th order entropy H(S) = -0.4log2(0.4) -0.6log2(0.6) = 0.97 if previous symbol is 0, probability of current symbol being 0 is 0.8 if previous symbol is 1, probability of current symbol being 0 is 0.1 For context 0, H(S1) = -0.8log2(0.8) -0.2log2(0.2) = 0.72 For context 1, H(S2) = -0.1log2(0.1) -0.9log(0.9) =0.47 Avg bit rate = 0.4*0.72+0.6*0.47 = 0.57
JPEG-LS Context model
-
8/10/2019 MMC_07_Still image compression.pdf
7/33
7
Why Do We Need Standards ? Image (and video) coding standards provide
interoperability between codecs built by different
manufacturers Basis for most products in communication technology
Standards based products can be build with common softwareand hardware tools
Only syntax and decoder specified
Standards provide state-of-the-art technology that isdeveloped by a group of experts in the field
Actual performance depends on implementation of standardregarding error resilience, delay, display
Encoder is not standardized and its optimization is left to themanufacturer
-
8/10/2019 MMC_07_Still image compression.pdf
8/33
8
The Scopeof Picture and Video Coding
Standardization
Only the Syntaxand Decoderare standardized:
Permits optimization beyond the obvious
Permits complexity reduction for implementability
Provides noguarantees of Quality
Pre-Processing EncodingSource
DestinationPost-Processing& Error Recovery
Decoding
Scope of Standard
-
8/10/2019 MMC_07_Still image compression.pdf
9/33
9
JPEG Joint Photographic Experts Group (ISO/JTC1/
SC2/WG10): Information Technology
Still (color) image coding
History: (Rao & Hwang, Chap. 8)
Nov.1986: JPEG, joined by CCITT and ISO,was established
June 1987: 10 proposals were evaluated.
Criteria : 3-stage progressive .25 bpp, .75bpp, 4bppThree classes of algorithms selected: Adaptive DCT,Adaptive DPCM, Generalized block truncation coding
-
8/10/2019 MMC_07_Still image compression.pdf
10/33
10
JPEG (cont.)
History: (cont.)
Jan.1988 : ADCT stood out in the secondround contest
Oct.1989 : Major technical points agreed
1989 -1991: Refinement Feb. 1991: Committee draft finished
July 1992 : International Standard
(IS)10918-1 established
-
8/10/2019 MMC_07_Still image compression.pdf
11/33
11
JPEG Operating Modes Sequential (baseline)
JPEG Compatible : support at least base line
Hierarchical Progressive
Lossless
-
8/10/2019 MMC_07_Still image compression.pdf
12/33
12
JPEG Features Resolution independence
Multiple of 8 or Padding
Precision DCT operations restricted to 8 or 12 bit for input sample
Lossless: 2~16 bpp
No bit rate target RD tradeoff by quantization
Luminance-Chrominance separability You can recover luminance only image
Extensible No bounds on # of progressive stages or low resolution
stages
-
8/10/2019 MMC_07_Still image compression.pdf
13/33
13
Common Mode of Operations DCT based process
Source image: 8-bit for each color component
Sequential operations
Huffman coding 2 AC and 2 DC tables
Decoders process scans with 1, 2, 3, 4 components E.g. CMYK
Interleaved and non-interleaved scans Non-interleaved scans
One 16x16 Y, 8x8 Cr, 8x8 Cb Y1, Y2, Y3 Y16, Cr1, Cr2, Cr3, Cr4, Cb1, Cb2, Cb3, Cb4
Interleaved scans
Y1, Y2, Y3, Y4, Cr1, Cb1, Y5, Y6, Y7, Y8, Cr2, Cb2
-
8/10/2019 MMC_07_Still image compression.pdf
14/33
14
JPEG Baseline Coder Sequential DCT coding
FDCT QDPCM
Zig-zagscan
DCHuffman
ACHuffman
8*8block
Quantmatrices
DC
AC
Codebooks
Codes
Codebooks
DC inv-Huffman
AC inv-Huffman
IDPCM
IQ IDCT
DC
AC
Quant
matrices
8*8recons
block
DCoffset
DC
offset
-
8/10/2019 MMC_07_Still image compression.pdf
15/33
15
Main Steps of JPEG Baseline Input data is 8-bits DC offset
Level shift by substracting 2n-1
For 8-bit, subtract 128 to remove DC level Only affects DC value, shift a neural gray intensity to zero
DCT Precision of DCT is unspecified IDCT precision: IEEE 1180.1 (withdrawed now)
DCT on 8x8 blocks Using blocks has the effect of isolating each block from its neighboring context.
This is why JPEG images look choppy blocky when a high compression ratio
Quantization Quantized DCT coefficients are restricted 11 bits
Zigzag scan VLC
DC: DPCM
AC: VLC
-
8/10/2019 MMC_07_Still image compression.pdf
16/33
16
Differential DC and Zig-zag Scan
wheres are quantized values.
- ZigZag scan to produce long run of zeros
),1()()( = iDCiDCiDiffDC
)(
DC
-
8/10/2019 MMC_07_Still image compression.pdf
17/33
17
QuantizationCustom quantization table: Visibility threshold
{Q (u, v )}, user specified, range [1 ~ 255]
Quantized coeffs.: (11 bits: [-128 x 8, 127 x 8])
Fq(u, v) = round ;
Inverse
R(u, v) = Fq(u, v) Q(u, v)
),(),(
vuQvuF
-
8/10/2019 MMC_07_Still image compression.pdf
18/33
18
Psychovisual Aspects Small variation in intensity is more visible in flat area
More visible in luminance
-
8/10/2019 MMC_07_Still image compression.pdf
19/33
19
Examples of Quantization Table ISO / IEC 10918-1 Annex K
Luminance table Chrominance table16 11 10 16 24 40 51 61 17 18 24 47 99 99 99 9912 12 14 19 26 58 60 55 18 21 26 66 99 99 99 9914 13 16 24 40 57 69 56 24 26 56 99 99 99 99 99
14 17 22 29 51 87 80 62 47 66 99 99 99 99 99 9918 22 37 56 68 109 103 77 99 99 99 99 99 99 99 9924 35 55 64 81 104 113 92 99 99 99 99 99 99 99 9949 64 78 87 103 121 120 101 99 99 99 99 99 99 99 9972 92 95 98 112 100 103 99 99 99 99 99 99 99 99 99
-
8/10/2019 MMC_07_Still image compression.pdf
20/33
20
Baseline Huffman Coding
-
8/10/2019 MMC_07_Still image compression.pdf
21/33
-
8/10/2019 MMC_07_Still image compression.pdf
22/33
22
Symbol-1 Structure
-
8/10/2019 MMC_07_Still image compression.pdf
23/33
23
Huffman DC Coding (cont.) Amplitude
coded using variable-length-integer (VLI) simply a shifted binaryrepresentation of the size bits
(1s Complement form)
Size = 0, no additional bits are required Huffman table for DC can be user specified or default
If user specified, transmit the table in the file header
-
8/10/2019 MMC_07_Still image compression.pdf
24/33
-
8/10/2019 MMC_07_Still image compression.pdf
25/33
25
Huffman AC Coding (cont.) Size: number of bits of the amplitude (11 categories)
Before coding, merge runlength and size information together.Then, (runlength, size) is coded using VLC. (Example in AnnexF) RLC (runlength, size) = [#-zeros-to-skip , next non-zero value]
Amplitude is coded using VLI.
-
8/10/2019 MMC_07_Still image compression.pdf
26/33
26
JPEG Default AC Huffman Table
(for Luminance) Symbol 1
-
8/10/2019 MMC_07_Still image compression.pdf
27/33
27
Symbol 2
-
8/10/2019 MMC_07_Still image compression.pdf
28/33
28
Examples After DCT and quantization
0
0
00001001
0001111100012123
012313520
[20,5,-3,-1,-2,-3,1,1,-1,-1,0,0,1,2,3,-2,1,1,0,0,0,0,0,0,1,1,0,1,EOB]
29: previous DC
-9 (0,5) (0,-3) (0,-1) (0,-2)
(0,-3) (0,1) (0,1) (0,1)
(0,-1) (0,-1) (2,1) (0,2)
(0,3) (0,-2) (0,1) (0,1)(6,1) (0,1) (0,1) (1,1) EOB
Zigzag scan
Run levelDPCM (101 0110/100 101/01 00/ /1010)
-
8/10/2019 MMC_07_Still image compression.pdf
29/33
29
Additional JPEG Coding Modes Sequential DCT mode Baseline
Progressive DCT mode
Spectral selection Low freq components of all blocks aretransmitted first; then, higher freq. components.
Successive approximation The most significant (ms) 1-bits of every coeff is transmitted; then, the next ms bit.
Hierarchical mode: Using up- and down-sampling to
increase/decrease spatial resolution. Lossless: DPCM Prediction errors are coded using VLC.
Arithmetic coding are used in other modes than baseline
More complex, but extra 5 ~ 10% bit rate reduction
-
8/10/2019 MMC_07_Still image compression.pdf
30/33
-
8/10/2019 MMC_07_Still image compression.pdf
31/33
31
Transmission of DCT Coefficients
-
8/10/2019 MMC_07_Still image compression.pdf
32/33
32
Hierarchical Coding
L l C di (R l d b
-
8/10/2019 MMC_07_Still image compression.pdf
33/33
33
Loseless Coding (Replaced by
JPEG-LS)
2:1 compression