The goal of this assignment is to understand both lossy and lossless compression techniques working on grayscale images. In the first part, you are supposed to implement two lossless compression techniques ??" LZW and Huffman coding. In the second part, you are supposed to implement a lossy compression technique ??" Vector Quantization, and you are not supposed to implement, but need to find a jpeg and jpeg 2000 encoder online, and compress sample grayscale images. You are free to use the code given in the assignment1 as a start for the assignment2 also, or write your own in C/C++ or any other programming language such as java. The input to your program will be two parameters where • The first parameter is the name of the grayscale image, which is provided in an 8 bit per channel RGB format (Total 24 bits per pixel). All images are of fixed size (256x256). • The next parameter controls what kind of compression technique is used. The parameter is 1 for LZW, 2 for Huffman coding, and 3 for Vector Quantization. To invoke your program we will compile it and run it at the command line as [login to view URL] C:/myDir/[login to view URL] M where C:/myDir/[login to view URL] and M is the parameter as described above. The program will generate a compressed image file ([login to view URL]) of the Y channel. Any format can be used for the result file of the program. Conversion of RGB to YUV Because the given sample images are grayscale images, if you convert RGB image to YUV image, then only values in Y channel are relevant, and all values in U and V channels are 0. It means that you need to apply compression techniques only to the Y channel. So, the first step of your program is the conversion of RGB to YUV. Part 1. Lossless encoding We provide several gray-level images, and you will compress them using either LZW or Huffman coding. In either case, we will consider an image is really a 256x256 long 1-D string, made up of consecutive rows.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables):
a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
This assignment needs to be run on Windows XP Professional/Windows Vista Operating Systems. Visual Studio Version 6 is the software needed to run and execute the program. Programming language should be Visual C++. For first two parts, i.e LZW coding and Huffman Coding, the output of the program is the number of bits used to encode the image. It is NOT an image. For vector quantization which is the second part, the output is an image.