240 likes | 381 Views
Group No 5. 1.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 TALHA LECTURER – SSUET TELECOMMUNICATION ENGINEERING DEPARTMENT. Contents.
E N D
Group No 5 1.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 TALHA LECTURER – 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)
JPEG Flow chart Transformation RGB YCbCr Run length coding Huffman coding RGB image 2-D DCT Quantization 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 Algorithm Start Is current symbol is part of tree? no Generate new node for this symbol yes Start with the leaf node Generate new node for NYA Is the current node the most significant of the block? no Subordinate new nodes to the old NYA yes Is the most significant node a parent node? yes no Exchange the node with most significant node of block Increment the weight of node Is the current node equal to the root? no Continue with parent node yes End
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
MATLAB Implementation • Developed and tested • Applied JPEG • Design of Huffman Algorithm • Extraction of Huffman code and stream • For the text file of the code
Verilog Programming Language • 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.
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
Appendix a- MATLAB test code Click to open code text file