Description
Project Specification
Download 775Proj1.tar.gz and uncompress it. This will produce a directory with the following structure:
- ImageReader: A directory with classes that can open and read an image file in any of jpeg, png, bmp, or tga formats.
- ImageWriter: A directory with classes that can open and write an image file in any of jpeg, png, bmp, or tga formats.
- Packed3DArray: A templated data type used by both the ImageReader and ImageWriter classes to hold an internal frame buffer representation of the image and allow it to be read or written almost as if it were an ordinary 3D array.
- lib: an empty directory into which the ImageReader and ImageWriter compiled libraries will be stored.
- project1: The directory in which your code will be placed. There is an example program there now that simply reads an image, modifies it, and then writes it back out. This program will show you how to use the three classes mentioned above. The comments in the header files ImageReader/ImageReader.h, ImageWriter/ImageWriter.h, and Packed3DArray/Packed3DArray.h have extensive documentation on usage as well.To run the example program, simply type “make” in the project1 directory, then type:
example file.jpg anotherfile.png
When you submit your project, tar and submit only the project1 subdirectory.
Running your project
Your program should be launched like:
- <code> is one of: n for nearest (no interpolation); l for bilinear interpolation; or c for bicubic interpolation.
- The “ext” can be any of the four supported types mentioned, and the input and output extensions need not be the same.
Then, for example, a session might look like (what you type is shown in red):
% resample c file.jpg out.png Dimensions of input image: 190 x 265 Enter desired resampled width: 380 Enter desired resampled height: 530 %
When the program ends, the result will have been written to the file “out.png“.
Note that your program must allow resampling to either a higher or lower resolution. Also, do not take any special action (or even bother to check) if the aspect ratio of the input and output files differ.
Analysis
Use your implementation with several images and systematically evaluate how the three interpolation approaches work when scaling up and down with different images exhibiting different amounts of high frequency detail. I am not necessarily looking for any general assessment as to what method is best with up or down scaling; instead just see if you can find some interesting insight into specific images that work better or worse with one technique or another. Include your observations in a pdf file submitted along with your project code.
Project Submission
When you are ready to submit your project, remove all the “.o” and executable programs in the directory containing your project. Do a cd to the parent directory and do the following:
tar cf project1.tar project1 gzip project1.tar
Attach the resulting file (project1.tar.gz) to an email and send it to me at jrmiller@ku.edu.

