Top Banner
 by B.Nirmal
16

RD-OPT & Adaptive Huffman Coding

Apr 09, 2018

Download

Documents

Micky Nirmal
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 1/16

 by

B.Nirmal

Page 2: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 2/16

Introductiony In this project we proposed the efficient method of 

image compression

y This technique is simple in implementation and

utilizes less memory

y An image of size 1024 x 1024 pixels, in which the

intensity of each pixel is an 8-bit quantity, requires 1

megabytes of storage space

Page 3: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 3/16

y Digital storage for image processing applications falls in to

three principal categories

1) Short-term storage for use during processing

2)Online storage for relatively fast recall

3)Archival storage, characterized by Infrequent Access

Page 4: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 4/16

JPEG Compressiony In lossy compression scheme,

The compression is achieved by dividing the image

in blocks of 8×8 pixels.

Applying a discrete cosine transform (DCT) on the

 partitioned image.

Resulting coefficients are quantized less significant

coefficientsThe dc coefficient and ac coefficient values are

encoded separately

Page 5: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 5/16

Fig 1.DCT based encoder/decoder processing steps

Page 6: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 6/16

y Efficient quantization matrix has to be designed based

upon the rate and distortion specification

y In image compression the encoding scheme plays the

important role

y The number of bits that used to represent the coefficients

must be reduced.

y Adaptive Huffman coding is used to encode the

coefficients since it is single pass method

Page 7: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 7/16

RD-OPT: Algorithm for Optimizing

DCT Quantization TablesIntroduction:

y A n Efficient algorithm for constructing DCT

quantization table with optimal rate -distortiontradeoffs for a given image

y It is used to compress the image at any desired

signal to noise ratio or compressed size

Page 8: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 8/16

y other approach include

Psycho-visual model based quantization

Rate-distortion based quantization Stochastic Optimization quantization

y Our algorithm is based on the Rate Distortion

y The Key feature of this algorithm is optimize theQuantization table over wide range of rates anddistortions

Page 9: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 9/16

Bit Rate for DCT Compressiony Rate is defined as the number of bits used to represent

per pixel

Rate= Size of compressed image

No of pixels in the image

y Increasing entries in the Q tends to decrease the rate

Rn(q)=(1/64)Entropy{(f[n]//q)},R(Q) R n(Q[n]).

n=0 to 63

Page 10: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 10/16

RD-OPT Algorithmy

Input:An image I of W X H . Pixel range [0«..255]

yOutput:

R D-optimal DCT Quantization table Q

y Step 1: Gather DCT Statics for the image

y Step 2: use the statics to calculate R n(q) and Dn(q) for 

each possible q

y Step 3: use dynamic programming to optimize R(Q) against

D(Q)

Page 11: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 11/16

Adaptive Huffman coding

y Huffman coding requires K nowledge of probabilities

of source sequence . It is a two pass procedure

y In Adaptive Huffman coding no need of probabilities

of source symbol. So it is a single pass procedure

y It based on statics of the symbols already encountered.

Page 12: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 12/16

Encoding Procedure

Page 13: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 13/16

Decoding Procedure

Page 14: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 14/16

Updating Procedure

Page 15: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 15/16

Example

Page 16: RD-OPT & Adaptive Huffman Coding

8/8/2019 RD-OPT & Adaptive Huffman Coding

http://slidepdf.com/reader/full/rd-opt-adaptive-huffman-coding 16/16

THANK YOU