COS 426 - Computer Graphics |
Spring 2012 |
Course home | Outline and lecture notes | Assignments |
In this assignment you will create a simple image processing program. The operations
that you implement will mostly be filters that take an input image, process the
image, and produce an output image.
The user interface for this assignment was kept as simple as possible, so you
can concentrate on the image processing issues. The program runs on the command
line. It reads an image from a file (the first program argument) and writes an image
to a file (the second program argument). In between, it processes the image using
the filters specified by subsequent command line arguments. For example, to increase
the brightness of the image in.jpg
by 10%, and save the result in the
image out.jpg
, you would type:
% imgpro in.jpg out.jpg -brightness 1.1
For each available image filter there may be one or more optional parameters (e.g., brightness takes a factor). To see the complete list of filters and their parameters, type:
% imgpro -help
If you specify more than one filter on the command line, they are applied in the order that they are found. For example,
% imgpro in.jpg out.jpg -contrast 0.8 -scale 0.5 0.5
would first decrease the contrast of the input image by 20%, and then scale down
the result by 50% in both x and y directions. Of course, you are welcome
to create your own filters and add program arguments for them by editing imgpro.cpp
.
However, please do not change the program arguments for the filters already provided.
-sampling
option prior to -scale
, -rotate
, or -fun
.
For Gaussian sampling, choose sensible Gaussian filter dimensionss. For
scaling, this requires adapting the extent of the Gaussian, for rotation
and fun, you may use a fixed size of your choosing.
xv
, PhotoShop, and Image Composer, or
GIMP (e.g., impressionist, charcoal,
stained glass, etc.). The points awarded for this feature will depend on
the creativity and difficulty of the filter. At most one such filter will
receive points.By implementing all the required features, you get 14 points. There are many ways to get more points:
.mpeg
, .mov
or .avi
format,
animating the results of one or more filters with continuously varying parameters,
e.g. the morph); It is possible to get more than 20 points. However, implementing more than 6 points worth of non-required features incurs diminishing returns: each successive point is worth 3/4 as much as the previous one. Thus, the adjusted extra credit score is computed according to the following formula:
Extra credit points cannot replace the required features (bold items). Your final score will be calculated by adding your score on the required features (up to 14 points) to your score on the optional features (up to 9 points, with diminishing returns past 6).
This assignment is due Thursday, February 23, 2012 at 11:59 PM. Please see the general notes on submitting your assignments, or the same notes explained in slides, as well as the late policy and the collaboration policy.
Please submit a single .zip file named [your NetID]_cos426_assignment1.zip containing
The Dropbox link to submit your assignment is here.
writeup.html
should be an HTML document demonstrating the effects
of the features you have implemented. For some features (e.g., black & white), you
can simply show the input and output of your program. However, for features that
take an input parameter (e.g., blur), you should provide a series of images showing
at least three settings of the input parameter to demonstrate that your code is
working properly. You can start from the skeleton writeup.html
provided
with the distribution as a template -- simply add sections to that HTML file for
the features you implement in the following format:
We remind you that you are expected to use good programming style at all times, including meaningful variable names, a comment or three describing what the code is doing, etc. We will test your code by running make in your src/ subdirectory, followed by make in the main assignment directory to create the output images. Please ensure that your code builds/runs in this way.