

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Digital Image Processing; Subject: Electrical & Computer Engineer; University: University of New Mexico; Term: Spring 2008;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Professor Majeed Hayat, [email protected]
From the text: Problems 8.5, 8.9(a–d), 8.17, 8. Problem 1. Huffman coding: Download from http://www.ece.unm.edu/~jpezoa/tmp the file Huffman.zip, which contains the following files: File.txt, Lena.raw (a 512× 512 pixels Lena saved as a binary image with 8 bits per pixel), encoder.exe, and decoder.exe. Put all of them in a single directory. To encode a file called input.txt, using k symbols at a time, and r percent perturba- tion of the nominal probabilities, type the following at the MS-DOS command: encoder input.txt output.txt k r. This puts the Huffman code for input.txt in the file output.txt To decode the file output.txt and put in the file input.txt, type: decoder output.txt input.txt k r
1
The following MATLAB commands can be useful: fwrite(FileID1,Length,’ubit8’); fwrite(FileID1,Dictionary,’ubit1’); fwrite(FileID1,Coefficient,’single’);
Finally compare the results of your compression, in terms of compression rate, with the files obtained using standard tools such as WinZip, gzip and WinRaR. Explain clearly why the file format is necessary and what kind of constraints imposes on the compression algorithms.