Transform Coding - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Transform Coding

Description:

Transform Coding 10 – PowerPoint PPT presentation

Number of Views:207
Avg rating:3.0/5.0
Slides: 46
Provided by: MsWi9
Category:

less

Transcript and Presenter's Notes

Title: Transform Coding


1
Transform Coding
  • 10

2
Introductions
Original Data
Transformation
Quantization
Channel
Decoder
Inverse Transformation
Reconstructed Data
3
Introductions
  • Orthogonal transform
  • Decorrelate data into a more compact form so that
    redundancy can be discarded more easily.
  • In some transform form, data can be more
    efficiently expressed.
  • A good question is Why not use non-orthogonal
    transforms ?

4
Introductions
Row 256 of lenna
2500.00
200.00
absolute dct values of lenna row 256
2000.00
160.00
1500.00
120.00
1000.00
80.00
500.00
40.00
0.00
0.00
0.00
200.00
400.00
600.00
0.00
200.00
400.00
600.00
5
Transforms as Coordinate Axes Rotations
6
Transforms as Coordinate Axes Rotations
Coordinate Axes Rotated by
7
Transforms as Coordinate Axes Rotations
8
Transforms as Basis Function Decompositions
9
Image Transforms
  • Decorrelate (Break) the correlations.
  • Basis fns independent on the input images.
  • Speed.
  • Karhunen-Loeve Transform (KLT)
  • Optimal transform
  • Basis functions are image dependent
  • No fast algorithm exists
  • Not so useful in image compression
  • Usually used for comparison

10
Image Transforms
  • Discrete Fourier Transform (DFT)
  • Use cos?jsin? as its basis functions
  • Fast Fourier Transform (FFT)-O(nlogn)
  • Not so popular in image compression because
  • performance is not good enough
  • computational load for complex number is heavy

11
Image Transforms
  • Discrete Cosine Transform
  • Use cosine function as its basis function
  • Performance approaches KLT
  • Fast algorithm exists
  • Most popular in image compression application
  • Adopted in JPEG
  • The periodicity implied by DCT implies that it
    causes less blocking effect than DFT
  • Can be implemented by 2n points FFT

12
Image Transforms
13
Image Transforms
14
Image Transforms
  • Walsh-Hadamard Transform (WHT)
  • Use square functions as its basis functions
  • Only addition and subtraction operations are
    needed
  • Popular when efficiency consideration dominates
  • Also popular in switching function transformation
  • Performance moderate

15
Image Transforms
16
Image Transforms
17
DCT Implementation
  • DCT implement
  • direct 2-dim O(N4)
  • separable basis function O(N3)

1-dim DCT (row)
Memory for transpose
1-dim DCT (column)
output
Input block
18
A Typical Transform Coder
Input image
Blocking
DCT
Thresholder
Binary bit stream
Entropy coder
Zigzag Scan 1-D sequencing
Quantizer
Entropy decoder
Inverse Zigzag Scan
Dequantizer
output image
Thresholder compensator
Blocking Integration
IDCT
19
A Typical Transform Coder
  • DCT/IDCT formula
  • Seperable
  • BASIS2D(i,ju,v) BASIS1D(iU)?BASSIS1D(j v)
  • process row, then column.

20
A Typical Transform Coder
  • Thresholding

output
-T
input
T
21
A Typical Transform Coder
  • Quantization

T3Q/2
TQ/2
-T-2Q -T-Q -T
T TQ T2Q
-T-Q/2
-T-3Q/2
Tdeadzone threshold Qquantizer step size
22
A Typical Transform Coder
  • Zonal sampling
  • select which DCT coefficients to be sent
  • Threshold sample selection
  • JPEG
  • Coefficients that are greater than a threshold
    are sent

23
A Typical Transform Coder
  • Bit Allocation
  • The larger variance occurs, the more bit are
    required.
  • DCT coefficients are usually represented by
    Guassian or Laplacian distribution. Based on
    these distribution, the optimal quantizer can be
    applied.

24
A Typical Transform Coder
  • Example

Run-length of zeros
End-of-block
128,30,-10,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,0
DC component
Nonzero amplitude
Symbol(run,amp)
128,(0,30),(0,-10),(4,-1),(4,1),EOB
25
JPEG DCT
  • Picture formats
  • Up to 65535 lines and 65535 pels/line
  • 8 or 12 bit precision
  • Typical picture sizes

CGA SIF VGA CCIR 601 SVGA HDTV
Pels/line 320 640 1280
Lines 240 480 960
26
JPEG DCT Example
27
JPEG DCT Example
  • Normalization array

28
JPEG DCT Example
  • 79 0 -2 -1 -1 -1 0 0
    -1 EOB

29
JPEG DCT Example
  • DC difference Huffman codeword/11100101/000/000/00
    0/110110/1010

AC coefficient grouping
Example of JPEG AC Huffman code table
30
JPEG DCT Example
31
JPEG DCT Example
32
Results
  • JPEG DCT at 0.25 bpp

33
Results
  • JPEG DCT at 0.5 bpp

34
Results
  • JPEG DCT at 0.75 bpp

35
Results
  • JPEG DCT at 1.0 bpp

36
Results
  • JPEG DCT at 1.5 bpp

37
Results
  • JPEG DCT at 0.5 bpp

38
Results
  • 786488 bytes

23116 bytes, Cr34.0
39
Results
786488 bytes
33079 bytes, Cr23.78
40
Results
786488 bytes
49746 bytes, Cr15.80
41
Results
786488 bytes
26614 bytes, Cr29.55
42
Results
786488 bytes
25485 bytes, Cr30.86
43
JPEG Lossless Coding
Prediction
0 No
1 A
2 B
3 C
4 AB-C
5 A-(B-C)/2
6 B-(A-C)/2
7 (AB)/2
44
Conclusions
  • DCT, VQ, and SBC(WT) are the three main research
    topics in Data Compression area.
  • Summary of Transform Coding
  • DCT is the best choice.
  • Performance for typical CCIR 601 pictures
    excellent ? 2 bpp
  • good ? 0.8 bpp
  • At very low-bit rate (lt0.5 bpp), block effects
    is introduced
  • Perceptually lossless at 1.5-2 bpp

45
Conclusions
  • Adjust threshold and quantizer to local
    statistics and human visual criterion.
  • A basic tool employed on JPEG, H.261, MPEG, HDTV
  • Extension to video
  • Motion JPEG (M-JPEG)
  • Compared to MPEG, M-JPEG has
  • No error propagation
  • Random access
  • Low complexity
  • But the compression ratio is low
Write a Comment
User Comments (0)
About PowerShow.com