Group No 5 1.Muhammad Talha Islam 2.Karim Akhter 3.Muhammad Arif 4.Muhammad Umer Khalid.

Post on 02-Jan-2016

224 views 2 download

Tags:

Transcript of Group No 5 1.Muhammad Talha Islam 2.Karim Akhter 3.Muhammad Arif 4.Muhammad Umer Khalid.

Group No 51.Muhammad Talha Islam

2.Karim Akhter

3.Muhammad Arif

4.Muhammad Umer Khalid

PROJECT TITLE

Huffman Implementation on FPGA and Its Application in Image Compression

INTERNAL

SIR UMAR TALHALECTURER – SSUET

TELECOMMUNICATION ENGINEERING DEPARTMENT

Contents

• Introduction

• Background

• JPEG

• Block diagram

• Huffman Algorithm

• Time Line

• Conclusion

Introduction

• Compression

To reduce the amount of data required to represent an image.

• Compression techniques

Lossy and Lossless

• Why Compression?

Communication and storage cost.

Constrains of bandwidth.

• Joint photograph Expert Group (JPEG).

• Application of Huffman coding. In JPEG

Background

• Multimedia Compression Standards

JPEG, TIF, GIF, PNG

• JPEG is widely used for still images

• Entropy coding

Huffman is used for lossless compression

• Using FPGA

JPEG

• JPEG is an image compression standard which was accepted as an international standard in 1992.

• Developed by the Joint Photographic Expert Group of the ISO/IEC for coding and compression of color/gray scale images.

• JPEG is lossy compression technique.

• Size depends on compression ratio.

Steps in JPEG

• The main steps in JPEG encoding are the following• Transform RGB to YUV or YIQ and subsample color

• DCT on 8x8 image blocks

• Quantization

• Zig-zag ordering and run-length encoding

• Entropy coding ( Huffman Coding)

Block Diagram for Image Transformation

JPEG Flow chart

RGB image

Transformation

RGB YCbCr

2-D DCTQuantizat

ion

Run length coding

Huffman coding

Quantization

Table

Huffman Table

Huffman Coding

• Developed by David Huffman.

• Uniquely and instantaneously decodable

• Huffman is the method of storing string of data and binary code

in efficient manner.

• Huffman is a lossless compression technique

• Huffman code will be always providing on the average code length

Which is less than any other code.

Run length coding

Huffman coding

Huffman Coding

• Contains smallest possible no of code symbols.

• Huffman code provides an optimized coding.

• As described in ICTs, in optimized coding, there should be:

The most occurring symbol must have smallest code word length.

In an optimum code the two symbols that occur least frequently will have same length

• Example

Huffman AlgorithmStart

Is current

symbol is part of tree?

Start with the leaf node

Is the current node

the most significant of

the block?

Increment the weight of node

Is the current

node equal to the root?

End

Continue with parent node

Generate new node for this symbol

Generate new node for NYA

Subordinate new nodes to the old NYA

no

yes

no

no

yes yes

yes

no

Exchange the node with most

significant node of block

Is the most significant

node a parent node?

Hardware-FPGA• Field Programmable Gate Arrays

• FPGA is integrated circuit designed to be configured by the customer or designer after manufacturing – hence “field Programmable”.

• Can be seen as “Soft” ASICs;

• Introduce a new computer paradigm;

• Enable the designers to implement algorithms directly in silicon.

• Make parallelism a key feature.

• Permit any required external interface to be established.

FPGA Architecture

• Static memory cells.• Volatile.• Essential component and generic FPGA.• Logic block usually based on LUTs.• I/O is interface between core of FPGA and

external devices.• Parallel processing• High Speed processing• Higher Power consumption• Any digital system can be implemented

• Developed and tested

• Applied JPEG

• Design of Huffman Algorithm

• Extraction of Huffman code and stream

• For the text file of the code

MATLAB Implementation

• Two main languages.

• Verilog – the C based language.

• Two types of variables; wire and reg.

• Initial and always block.

• Choice of an FPGA development board.

• Market stake holders of FPGA.

Verilog Programming Language

Time Line

Month Activity

January-February Preparation of proposal

March-June Literature Review

July-August Implementation on MATLAB

September Verilog Programming

October-November Design of algorithm in Verilog

December Implementing on FPGA

Conclusion

• JPEG is a compression lossy compression technique but Huffman man is a lossless compression technique.

• Huffman coding is an efficient source coding algorithm for source symbols that are not equally probable.

• Huffman provides uniquely decodable codes (prefix code).

• Implementing Huffman algorithm on FPGA is a better approach because

on FPGA hardware are designed for specific algorithm. End

Huffman Encoding Example

Appendix a- MATLAB test code

Click to open code text file

Thanks for Watching