Professional Documents
Culture Documents
The lossless compression algorithms like Huffman coding, dictionary based coding, arithmetic coding etc are mainly used to compress text When it comes to a huge data arrangement like images, speech, video etc., these algorithms fail to provide sufficient compression in the data The term Lossy indicates that there is a loss of information (mostly intentional) while encoding the data, which is mostly unnoticeable by the human eyes
Distortion Measure
A distortion measure is a mathematical quantity that specifies how close is an approximation to its original, using some distortion criteria Difference between original and approximated data? In Images Perceptual distortion is important and not the numerical distortion
Non Uniform SQ
Here smaller step size is used where the signal occurs predominantly and enlarged step size is used where signal sparsely occurs Two common approaches
Lloyd Max Quantizer Companding
Lloyd-Max Quantizer
Begin Choose initial level set (y0,y1) i = 0; Repeat Compute bi using its equation i=i+1 Compute yi using its equation Untill |yi yi-1| < End
Companding
In companded qunatization, input is mapped by compressor function C(x) Then it is quantized by an uniform quantizer After Transmission the quantized values are mapped back using an expander function C-1(x)
Vector Quantization
Encoding of frequently occurring words in English like the or and etc. provide better compression than encoding each letters t h e a o etc The same concept can be extended to speech, images as segments in speech or a collection of pixels in image and these groups of samples are called as VECTORS
Vector Quantization
A compression system performs better if it is operated in a group of vectors (collection of data) VQ is same as SQ but extended to multiple dimensions In VQ an n-component code vector represents vectors that lie within a region in n dimensional vector space. A collection of these code vectors form the codebook for the vector quantizer
Basic VQ procedure
Transform Coding
In case of data like speech and images, the different bit encoding should not be done to highly correlated samples. But however, majority of the samples are correlated to each other! Eg in text : THINK and THING, THROUGH and THOUGH, MIGHT and FIGHT Transform coding helps in removal of these correlation, so that effective encoding can be done
Transform Coding
Let X =[x1,x2,x3..xk]T be vector of samples X -> T{x} -> Y -> T-1{x} -> X Y is the resultant of linear transformation of X and vector Ys elements are made less correlated, so that the encoding is done better Less correlated = More Othogonal Transform T itself doesnt compress the data, it helps the compression algorithm to perform better (Better compression ratio)
DCT (Continued)
For the 1D DCT defined, there will be a set of 8 different basis functions and their coefficent matrix is as shown
Characteristics of DCT
DCT produces frequency spectrum F(u) corresponding to the spatial signal f(i) The first coefficient is the DC component of the signal, which gives the average magnitude of the signal The other seven AC components (basis functions) have characteristics like the first component completes half cycle, second completes one cycle, third completes one and half seventh completes three and half cycles DCT coefficients can also take negative values (For image DC component is always positive) DCT is a linear Transformation DCT (pA + qB) = p DCT(A) + q DCT(B)