210 likes | 234 Views
Wavelets in Image Compression. What are the principles behind compression?. Two fundamental components of compression are redundancy and irrelevancy reduction. Redundancy reduction aims at removing duplication from the signal source (image/video).
E N D
What are the principles behind compression? • Two fundamental components of compression are redundancy and irrelevancy reduction. • Redundancy reduction aims at removing duplication from the signal source (image/video). • Irrelevancy reduction omits parts of the signal that will not be noticed by the signal receiver, namely the Human Visual System (HVS).
Original image Source encoder linear transform to decorrelate the image data (lossless) (reconstructed) (inverse T) (dequantization) Compressed image Entropy Coding of the resulting quantized values(lossless) (decoding) Image compression steps: Quantization of basis functions coefficients (lossy)
Basic ideas of linear transformation • We change the coordinate system in which we represent a signal in order to make it much better suited for processing (compression). • We should be able to represent all the useful signal features and important phenomena in as compact manner as possible. • Important to compact the bulk of the signal energy into the fewest number of transform coefficients.
Which options do we have for linear transformation? A possible choice for the linear transformation are: • DFT • or, avoiding complex coefficients, the DCT • JPEG (decomposition into smaller subimages of size 8x8 or 16x16, followed by DCT as the compression algorithm)
Why Wavelet-based Compression? • No need to block the input image and its basis functions have variable length to avoid blocking artifacts. • More robust under transmission and decoding errors. • Better matched to the HVS characteristics • Good frequency resolution at lower frequencies, good time resolution at higher frequencies – good for natural images.
Energy Compactness No compression yet
EZW: ZeroTree Coding • Uses “parent-child” dependencies between • subband coefficients at same spatial location • ‘Bit-plane’ coding: enables an embedded bitstream wrt distortion
Significance Pass • Significant Coefficient y w.r.t. Threshold T: |y|≥T • In a significance pass, all as yet insiginfant coefficients are examined and declared either: Significant positive Significant negative Root of a zerotree (All children and root insigificant) Isolated insisignificant • At each pass, T ←T/2
Refinement Pass • All coefficient previously declared significant are refined by one bit: • y-estimate quantized to + or – T/4 • Coefficients are visited by decreasing magnitude, then in raster order
Set Partitioning in Hierarchical Trees(SPIHT) • Same sort of idea as EZW • More efficient • Based on two types of zerotrees (not including root): • All descendants of a node are insignificant (Type A) • All descendants of a node starting with the grandchildren are insignificant (Type B)
SPIHT • Coefficients and trees are stored in lists processed in sequence • List of Significant Coefficients (LSC) • List of Insignificant Coefficients (LIC) • List of Insignificant Sets (LIS) • The lists enable a more efficient scan order of the different trees and coefficients
Coding passes • All nodes from low-res LL in LIC, all those with descendants in LIS • Examine nodes in LIC. If become significant, “1” and their sign, move to LSC; otherwise “0” • Examine sets in LIS. If remains insignificant, “0”. Else “1” and: If Type A: Encode all children’s current bit (and sign), move them to end of LIC or LSC Change Type to B, move to end of LIS If Type B: delete tree from LIS. Add each child at end of LIS as Type A. • Refinement: refine all coefficients in LSC
MATLAB Implementation • Analysis at various Compression rate. • PSNR