130 likes | 308 Views
Image Compression and Signal Processing. Dan Hewett CS 525. Keys to Compression. Lossless – Must find information redundancy Lossy Find information similarity Degrade quality. Types of source images. Complex Line Drawing Noisy Simple.
E N D
Image Compression and Signal Processing Dan Hewett CS 525
Keys to Compression • Lossless – Must find information redundancy • Lossy • Find information similarity • Degrade quality
Types of source images Complex Line Drawing Noisy Simple
Simple Lossless Compression(GIF) • Low number of colors (Uses a color map) • Compression is based on repeated elements (LZW) • Does not work on a wide variety of source images
Compression in Frequency/Spatial domain • Takes advantage of spatial relationships • Compression may decrease color resolution • May take advantage of human perception • May use further encoding (Huffman/RLE, etc) on frequency data
Frequency Transforms (cont) • Information content is not gained/lost • Compressibility is due to redundancy/similarity in the new domain. • DFT/FFT/DCT – How do they work?
Frequency Transforms • Looks at the sinusoidal behavior of the color in each row and column
How do they work • DFT (Discrete Fourier Transform) • Real valued inputs -> A single complex output • Measures “how much is there” of a single frequency • FFT (Fast Fourier Transform) • Real inputs -> Complex Outputs (0..fs/2) • Measures “How much is there” of n/2 frequencies • DCT (Discrete Cosine Transform) • Real inputs -> Real output
Basics of DFT • DFT compares sin/cos to wave • Result is complex number (mag+phase)
Basics of DCT • Real Inputs -> Real outputs • JPG encodes each pixel based on an 8X8 matrix of DCTs • Results of the DCT are then discretized and compressed
Quality of compression • Low frequency lends to high compression with less loss • Impulses (non-smooth) source can lead to unpleasant artifacts
Conclusion • Redundancy/similarity is key to compression • Find the domain where redundancy/similarity occur • Discretize/quantize for further reduction