CS 4810: Introduction to Computer Graphics
Spring 2015


Home | Schedule | Assignments

Programming Assignment 1: Image Processing

Due Thursday, 2/5 at 11:55PM

Overview

In this assignment you will create a simple image processing program, a pared-down version of Adobe Photoshop or The Gimp. The operations that you implement will be mostly filters which take in an input image, process the image, and produce an output image.

The code skeleton can be downloaded here.

An overview of the code you will be using can be found here.

Some test images can be found here.

Examples of what some of the results should look like can be found here.


Getting Started

You should use the code skeleton as a starting point for your assignment. We provide you with several files, but you should only have to change image.todo.cpp and lineSegments.todo.cpp.

After you copy the provided files to your directory, the first thing to do is compile the program. To do this, you will first have to compile the JPEG library and then compile the assignment1 executable.

On a Windows Machine
Begin by opening Assignment1.sln using Microsoft Visual Studio.
On a Unix Machine

How the Program Works

The user interface for this assignment was kept to the simplest possible, so you can concentrate on the image processing issues. The program runs on the command line. It reads an image from a specified file, processes the image using the filter specified by the command line arguments, and writes the resulting image to the specified file.
The command line parser is set up to read the arguments from the command line that are specified in the following format: First the parameter name is specified by pre-pending with two hyphens, and then the parameter values are enumerated. (Note that the number of arguments associated to each parameter are fixed in main.cpp and the order in which the parameters are specified is ignored.)
For example, to increase the brightness of the image in.bmp by 10%, and save the result in the image out.bmp, you would type:
% Assignment1 --brighten 1.1 --in in.bmp --out out.bmp
To see the full list of possible arguments, you can simply type:
% Assignment1
This gives you a list of all the possible parameter names and the number and meaning of the associated parameter values. Bracketed parameters are optional (an input image file and an output image file need to be specified).
Note that since the order in which parameters are specified is ignored, if you want to apply two filters to a single image you can specify parameters for both filters, but you cannot control the order in which the filters are applied. For some filters, the order in which the filters are applied does not affect the output image while for others, the output image may depend on the order. (For the latter case, you can control the ordering by applying one filter, writing the output to a temporary image, and then applying the second filter to the temporary image.)
The current main.cpp decides if the specified image file is Windows BMP file or a JPEG file based on the file extension.

What You Have to Do

The assignment is worth 30 points. The following is a list of features that you may implement (listed roughly from easiest to hardest). The number in front of the feature corresponds to how many points the feature is worth. The assignment will be graded out of 30 points. In addition to implementing these features, there are several other ways to get more points: For images or movies that you submit, you also have to submit the sequence of commands used to created them, otherwise they will not be considered valid.

It is possible to get more than 30 points. However, after 30 points, each point is divided by 2, and after 32 points, each point is divided by 4. If your raw score is 29, your final score will be 29. If the raw score is 33, you'll get 31.25. For a raw score of 36, you'll get 32.


What to Submit

Submission intstructions are specified here.
Please include the following in your submission: