1 / 17

Transform Coding

Transform Coding. Mei-Chen Yeh 12/04/2009. Introduction. To compact most of the information into a few elements The weight-height example:. Discard y (2D->1D) and inverse transform. Transform. 68 °. Another example. Slide credit: Bernd Girod. Transform Coding. Three steps

rae-sears
Download Presentation

Transform Coding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transform Coding Mei-Chen Yeh 12/04/2009

  2. Introduction • To compact most of the information into a few elements The weight-height example: Discard y (2D->1D) and inverse transform Transform 68°

  3. Another example Slide credit: Bernd Girod

  4. Transform Coding • Three steps • Divide a data sequence into blocks of size N and transform each block using a reversible mapping • Quantize the transformed sequence • Encode the quantized values Transform Quantization Binary coding

  5. The Transform x θ • Forward transform • Inverse transform • Orthonormal transforms • A-1 = AT • Linearity: x is represented as a linear combination of “basis vectors” • Parseval’s Theorem holds: the total energy is preserved N-dimensional vector N-dimensional vector or NxN matrix or Transform

  6. Two-dimensional transform • Separable transforms • Take the transform along one dimension, then repeat the operation along the other direction • Ex: rows -> columns, or columns -> rows • Forward transform • Backward transform NxN matrix NxN matrix NxN matrix

  7. Transforms of interest • Data-dependent • Discrete Karhunen Lòeve transform (KLT) • Data-independent • Discrete cosine transform (DCT)

  8. KLT • Also known as Principal Component Analysis (PCA), or the Hotelling transform • Transforms correlated variables into uncorrelated variables • Basis vectors are eigenvectors of the covariance matrix of the input signal • Achieves optimum energy concentration • Disadvantages • Dependent on signal statistics • Not separable

  9. DCT (1) • Part of many standards (JPEG, MPEG, H.261, …) • The transform matrix C • Visualize the rows of C The frequency increases as we go from top to bottom!

  10. DCT (2) • 2-D basis matrices of DCT Increased variation!

  11. DCT (3) • Performs close to the optimum KLT in terms of compaction

  12. Quantization and coding of transform coefficients (1) • The bit-rate allocation problem • Divide bit-rate R among transform coefficients such that resulting distortion D is minimized Transform Quantization Binary coding

  13. Quantization and coding (2) • The optimal bit allocation • The zonal sampling • Compute σ2θk for each coefficient • Set Rk = 0 for all k • Sort {σ2θk}. Suppose σ2θ1 is the max. • Increment R1 by 1, divide σ2θ1 by 2. • Decrement Rb by 1. • If Rb=0, stop; • Otherwise, go to step 3 variance of the transform coefficient θk Rb = 72 bits Discarded!

  14. Quantization and coding (3) • The threshold coding • Transform coefficients that fall below a threshold are discarded • Example: a 8x8 block The zigzag scan Sample quantization table Horizontal frequency → DC component vertical frequency → AC components noisy

  15. Quantization table Example: Encode Remove mean, DCT Quantize Zigzag scan -26 -3 0 -3 -2 -6 2 -4 1 -4 1 1 5 1 2 -1 1 -1 2 0 0 −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 0 Add EOF -26 -3 0 -3 -2 -6 2 -4 1 -4 1 1 5 1 2 -1 1 -1 2 0 0 −1 1 −1 2 0 0 0 0 0 −1 −1 EOF Entropy coding 010001010000101110000011101010011000101111100000……………

  16. Quantization table Example: Decode 010001010000101110000011101010011000101111100000…………… Original block Entropy decoding -26 -3 0 -3 -2 -6 2 -4 1 -4 1 1 5 1 2 -1 1 -1 2 0 0 −1 1 −1 2 0 0 0 0 0 −1 −1 EOF Put into a block Reconstructed block Inverse DCT, Add mean Q-1

  17. One more example

More Related