EE225B11/26/2010Image Coding and Compression Why Compression? Two hour SD movie28 Dual-Layer DVDs30framessec£ (720 £ 480)pixelsframe£ 3bytespixel=31:1MB=s31:1MB=s £ (602)sechr£ 2hrs¼ 224 GBEE225B21/26/2010What to Code? Image intensities RGB, YCrCb Transform coefficients Model parametersEE225B31/26/2010Image Coding Model Object: Reduce the data size without sacrificing the image quality Compression RatioTransformation QuantizationCodeword assignmentImagesourcebitstreamEE225B41/26/2010Example: Image QuantizationEE225B51/26/2010Fidelity Criteria RMS SNR PSNRerms="1MNM¡1Xx=0N¡1Xy=0h^f(x; y) ¡ f(x; y)i2#1=2SNRms=M¡1Px=0N¡1Py=0^f(x; y)2M¡1Px=0N¡1Py=0h^f(x; y) ¡ f(x; y)i2max piermsEE225B61/26/2010Rating ScaleEE225B71/26/2010Other Metrics P-PSNR VSNR SSIMEE225B81/26/2010EE225B91/26/2010Image Quantization and Reconstruction Quantization is the “lossy” part Achieves the most compression efficiency Scalar Quantization Vector QuantizationEE225B101/26/2010Uniform Quantization Equal spacing of the reconstruction levels False contoursEE225B111/26/2010Improved Gray-Scale (IGS) Treat the LSBs as noise and use them to remove the false contoursEE225B121/26/2010Non-Uniform Quantization Optimal Quantizer Minimizing RMS by choosing the decision levels and reconstruction levels Lloyd-Max QuantizerEE225B131/26/2010EE225B141/26/2010Non-Uniform Quantizer by Transformation We can “flatten” a non-uniform distribution source by applying transformationEE225B151/26/2010Codeword Assignment: Bit Allocation Uniform assignment Non-Uniform assignment Assign the codeword according to its probability Uniquely decodableEE225B161/26/2010Holy Grail: Entropy Entropy just provides the lower bound of the average codeword length, not the actual codeword assignment methodH ´¡LXi=1pilog2piEE225B171/26/2010Huffman CodingLavg=2.2 H=2.14EE225B181/26/2010Huffman CodingH(x) · Lavg· H(x)+1pmax< 0:5;H(x) · Lavg· H(x)+pmaxpmax¸ 0:5;H(x) · Lavg· H(x)+pmax+0:086Fail at highly skewed dataTighter
View Full Document