This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Compression (cont’d) Compression (cont’d) CS 450: Introduction to Digital Signal and Image Processing Bryan Morse BYU Computer Science Compression (cont’d) Interpixel Redundancy Interpixel Redundancy The basis of interpixel redundancy is repetition prediction Compression (cont’d) Interpixel Redundancy Repetition Run-Length Encoding Encode sequences of identical symbols as (symbol,count) pairs. Can use fixed-size counts or special prefixes to indicate the number of bits for the count Fixed: can reduce compression if either too large or too small Variable: overhead for the prefixes Can extend to multiple dimensions Encode difference from the previous line (hopefully long runs of 0s) Encode using lengths or markers from previous line Useful for binary signals and black-and-white images. 2-D RLE is used in the CCITT fax standard. Compression (cont’d) Interpixel Redundancy Repetition Lempel-Ziv-Welch Basic idea: encode longest possible previously-seen sequence Coding stream is mixture of symbols and back-pointers Better yet: Keep a “codebook” of previously-seen sequences Store codebook index instead of backwards pointers. Used in most common text compression algorithms, zip, and the GIF image standard. Compression (cont’d) Interpixel Redundancy Repetition Lempel-Ziv-Welch codebook = all single symbols sequence = empty while (get(symbol)) if sequence + symbol is in codebook sequence += symbol else output(code for sequence) add sequence + symbol to codebook sequence = symbol Compression (cont’d) Interpixel Redundancy Repetition Example: Lempel-Ziv Mary had a little lamb, little lamb, little lamb, Mary had a little lamb, its fleece was white as snow. Compression (cont’d) Interpixel Redundancy Prediction Predictive Coding Use one set of symbols/pixels to predict another.Use one set of symbols/pixels to predict another....
View Full Document
This document was uploaded on 03/15/2012.
- Fall '09
- Image processing