Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arunan a/l Sinniah Tan Suet Chuan Davinderpal Singh Vijayan a/l Kasinathan Cheong Tian Guan.

Similar presentations


Presentation on theme: "Arunan a/l Sinniah Tan Suet Chuan Davinderpal Singh Vijayan a/l Kasinathan Cheong Tian Guan."— Presentation transcript:

1 Arunan a/l Nalliah @ Sinniah Tan Suet Chuan Davinderpal Singh Vijayan a/l Kasinathan Cheong Tian Guan

2 Definition: zpredicts next pixel value based on the previous values zthe difference between the predicted value and the actual value is then encoded zin Analog signal, a.k.a. differential pulse code modulation or DPCM

3 Why use DPC? zIt takes advantage of the fact the difference between adjacent pixels are typically small, in other words highly correlated zSince the difference is small, it requires only a few bits to represent it

4 Predictor zA predictor can further reduce the information to be coded zUsing a simple prediction equation, the next pixel value is estimate and the difference between the estimate and actual value is encoded zThe error is then quantized, to reduce data and maximize visual results, and then be encoded

5 Theoretically optimum predition equation zI~(r, c + 1) =  I^(r,c) + (1-  ) I_ (r,c) zWhere I_(r,c) = average value for the image z  = normalized correlation between pixel values zfor most image  is between 0.85 and 0.95 zwhen next pixel value is predicted, the error is calculated: ze(r, c+1) = I(r,c+1) – I~(r,c+1)

6 zthe error is then quantized: ze^(r,c+1) = I^(r,c+1) - I~(r,c+1) zthe quantized error is encoded using a lossless encoder, such as a Huffman coder

7 Important Note: zthe predictor uses the same values during both compression and decompression, specifically the reconstructed values, not the actual values zexamples in book uses truncation quantization

8 Two-dimensional equation zprediction equation can be one- or two- dimensional zone-dimensional based on previous values in the current row only ztwo-dimensional based on previous values in the current row and previous row(s) zusing more previous values increase complexity of computation in compression and decompression.

9 Lloyd-Max quantizer Where  = the standard deviation of the error distribution For most images,  for the error signal is between 3 and 15

10 zTransform coding is a form of block coding done in the transform domain. zImages are divided into: a)Blocks b)Subimages zTransform is calculated for each block.

11 zTransforms:a)frequency example : Fourier Transform b)sequency example : Walsh Transform c)discrete cosine transform optimal for most images zAfter transform has been calculated, the coefficients are quantized and coded.

12 zFrequency and sequency transform puts most of the information into few coefficients so that many high frequency coefficients can be quantized to zero. (eliminate completely) zActually, image compression is to pack the information into as few coefficients as possible. zTransform coding achieved by filtering. (can simply eliminate some of the high frequency.)

13 zBut it won't provide much compression because transform data is typically floating point. –Quantization process performed by bit allocation. zBit allocation is determining the number of bits to be used to code each coefficient. zMore bits used for lower frequency. Example: yTransform coding DCT for 4*4 block. ySelected bit allocation represented by mask.

14 x8 6 4 1 x6 4 1 0 x4 1 0 0 x1 0 0 0 zEach number in mask is numbers of bits to represent the corresponding transform coefficient. zUpper-left corner corresponds to the zero frequency coefficient/ average value. zFrequency increases to right and down.

15 zAllows lower frequency less quantization. (more resolution) zThis is because they have more bits to represent them.

16  The discrete cosine transform (DCT) helps separate the image into parts (or spectral sub-bands) of differing importance (with respect to the image's visual quality). z With an input image, A, the coefficients for the output "image," B, are:

17 zFor simple filtering, two types of transform coding are used. xzonal coding xthreshold coding zThe coding is varying in the way of selecting the transform coefficients. zThe ideal filter for transform coding selects the coefficients based on their location in the transform domain.

18  Selecting specific coefficients based on the maximal variance.  Zonal mask determined for the entire image.  The mask finds the variance for each frequency component.  Variance calculated by using sub image as a separate sample.  Then find the variance within this group of sub images.

19 zZonal mask is a bitmap of 1's and 0's.  1's corresponds to coefficients to retain  0's corresponds to coefficients to eliminate zZonal mask predetermined because low frequency term contains the most information.

20  Selects coefficients above a specific value.  Different threshold mask required for each block.  So, it increases file size as well as algorithmic complexity.

21 xAfter transform coding, quantization scheme is applied. xThe Lloyd - Max quantization is used. xQuantization is important because zero frequency coefficients for real images contain large portion of the energy in the image and it's always positive. xHigher frequency coefficients don't need quantization. xAfter quantization, the coefficients are coded using Huffman coding method.

22 xLevel shifting done first. xSecondly DCT is computed. xDCT coefficients are quantized, by dividing by the values in a quantization table. xThe truncate the value. xCoding using Huffman code.

23 zHybrid compression methods use both domains:  Spatial  Transform zAdvantage: yCan achieve very high compression ratios. zDisadvantage: yThe decompressed images often have an artificial look to them.

24 zAnother method is known as the Wavelet based compression method. The general method is as follows: x.Use convolution masks to perform the method on the image. x.The different wavelet bands are numbered from 0 to N-1 (N = Total number of wavelet bands. 0 = Lowest frequency) x.The 0 band is scalar quantized linearly to 8 bits. x.The middle bands are quantized using a small block size. xThe highest frequency bands are eliminated after the codebook size is decreased as the band number increases.


Download ppt "Arunan a/l Sinniah Tan Suet Chuan Davinderpal Singh Vijayan a/l Kasinathan Cheong Tian Guan."

Similar presentations


Ads by Google