1 / 27

Outline of Vector Quantization of Images

Outline of Vector Quantization of Images. VQ Coding Outline. Divide data (signal) into non-overlapping vectors (Each vector contains ‘n’ elements (pixels/samples)) For each image vector : Find closest vector in codebook Get its index in codebook Encode indices. VQ Decoding Outline.

cate
Télécharger la présentation

Outline of Vector Quantization of Images

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. Outline of Vector Quantization of Images

  2. VQ Coding Outline • Divide data (signal) into non-overlapping vectors • (Each vector contains ‘n’ elements (pixels/samples)) • For each image vector : • Find closest vector in codebook • Get its index in codebook • Encode indices

  3. VQ Decoding Outline • Entropy decode the indices • Lookup codebook for each index and retrieve vector • Combine vectors to reconstruct image (data)

  4. VQ Terminology • Vector : Group of ‘n’ elements (pixels/samples) • Codebook : (Final) set of codevectors • Training set : (Initial) set of codevectors • Codevector : Vector derived from image/group of images

  5. Why VQ is better than scalar Quantization • Scalar Quantizer : • Treats each pixel independently • Does not use correlation between neighboring pixels • Vector Quantizer: • Image (data) divided into vectors (blocks) • Correlation among pixels in vectors is exploited • Block size should be appropriate: • Too large block : correlation is lost • Too small block : More code vectors • If no interpixel correlation, then no gain

  6. VQ Bitrate • Vector size : n (say, n = p x p) pixels • Codebook size : L vectors • Codebook index size : bits • Bit Rate of VQ : bits/pixel

  7. Distortion Measures Codebook Image V1 codevectors : Vi , xk V2 closest matching code vector Vk Image vectors : Xj VL Mean Square Error (MSE) (Euclidean Distance) Weighted MSE

  8. Two Basic Kinds of Codebook • Local Codebook • One codebook for each image • Codebook derived from vectors of one image • Good performance (Quality of reconstruction) • More overhead : • (1) computation • (2) Transmission of CB to decoder

  9. Two Basic Kinds of Codebook • Global Codebook • One codebook for a class of images • Codebook derived from vectors of all images in the class • Less overhead (compared to local codebook) • Lower performance

  10. Major Issues in VQ • Generation (construction) of codebook • concerns what needs to be included in the codebook • Design of codebook • concerns structuring codebook entries to minimize search time

  11. Codebook Generation • Generate codebook from a Training set • Training Set: Set of vectors derived from image vectors • Codevectors should minimize distortion • Most commonly used algorithm : LBG algorithm • LBG : Linde–Buzo–Gray algorithm

  12. LBG Algorithm Outline

  13. Codebook Initialization • Three basic schemes: • Random • Perturb and Split (Bottoming) • Pairwise Nearest Neighbor (PNN) clustering (PNN)

  14. Codebook Design • Basic objective : Minimize search time for codevector • Full (Exhaustive) Search : very expensive • Design emphasis : Organization of codebook

  15. Codebook Organizations • Tree-structured codebook • Product codebook • Mean/Residual VQ • Interpolative/Residual VQ • Gain/Shape VQ • Classified VQ • Finite State VQ

  16. Tree – Structured Codebook • Codebook organized as M–ary tree • Number of Levels : • Code vectors stored at the leaves • Intermediate node : ‘average’ of ‘codevectors’ of children • Improved search time • Increased Storage cost • Performance inferior to full search

  17. Variations of Tree – Structured VQ • Tapered trees: • Non – Uniform number of branches at nodes • Branches per node increases going down the tree ( Ex: 2 branches at level 1, 3 at level 2 etc.) • Pruned Trees • Start with (full) large initial tree • Remove code vectors that do not reduce distortion

  18. Product Codebook • Codebook : Cartesian product of many smaller codebooks • Vector characterized by many independent features:f1,f2...,fN • Separate codebook for each feature • Smaller codebook sizes : L1,L2...,LN • Effective codebook size : L1,L2...,LN • Actual storage + search complexity O(L1+L2+...+LN)

  19. Prediction/Residual Class VQ • Predict Original Image • Derive Residual Image • Data used in prediction: Scalar Quantization + Encoding • Residual Image : Vector Quantization • Major Types: • Mean/Residual VQ • Interpolative/Residual VQ

  20. Mean/Residual VQ • Image Vectors have similar variations about different mean/ends • Remove mean from vectors fewer code vectors

  21. Mean/Residual VQ • Scheme : • Compute ‘mean’ of image vectors : M={m1,m2...,mN} • Quantize M using scalar quantization : • (Apply DPCM before Quantization further bitrate reduction) • Subtract Quantized means from vector elements • Residual vectors • Quantize Residual vectors using VQ

  22. Interpolative/Residual VQ • Subsample original image by l in each dimension (typically, l=8) • Quantize subsampled value • Upsample using Quantized subsampled values (typically, bilinear interpolation is used) • Form Residual : (Original – Upsampled) • Segment Residual to form 4 x 4 vectors • Quantize Residual vectors using VQ

  23. Classified VQ • Several codebooks • Each codebook for a specific feature • ex. edges, smooth areas, etc. • Codebooks could be of different sizes

  24. What is the measure of performance VQ? • How does one rate the performance of a compressed image or sound using VQ?  • There is no good way to measure the performance of VQ.  • This is because the distortion that VQ incurs will be evaluated by us humans and that is a subjective measure. 

  25. What is the measure of performance VQ? • We can always resort to good old Mean Squared Error (MSE) and Peak Signal to Noise Ratio (PSNR).  • MSE is defined as follows: where M is the number of elements in the signal, or image.

  26. What is the measure of performance VQ? • For example, if we wanted to find the MSE between the reconstructed and the original image, then we would take the difference between the two images pixel by pixel, square the results, and average the results.

  27. What is the measure of performance VQ? • The PSNR is defined as follows: where n is the number of bits per symbol.  • As an example, if we want to find the PSNR between two 256 gray level images, then we set n to 8 bits.

More Related