COS 426 Computer Graphics - Fall 1997

COS 426 Home

Projects

Project 0

Project 1 (hints)

Project 2 (hints)

Project 3 (hints)

Project 4 (hints)

Project 5 (hints)

Project 6
Project 2 - Photoshop
Assigned: 09/29/97
Due: 10/12/97
Points: 20

In this assignment you will create a simple image editing program. The operations that you implement will mostly be "filters" (Photoshop terminology) which take an input image and somehow process the image to produce and output image. We will be using the ppm image format for representing images on disk. Images may be converted to and from the ppm format using the program xv.

Getting started
To get started, download the user-interface, or (if that doesn't work) make a copy of the directory (in MECA)

% /u/cs426/projects/project2.tar.gz

These files may be unpacked in your directory by typing:

% gunzip project2.tar.gz
% tar xvf project2.tar
% rm project2.tar

The first thing to do is read the README file. Then try

% make
% project2

User interfaces
As with Project 1, most of the user interface (implemented in Tcl) will be provided for you, so the features you are required to implement focus on image editing. However, some optional features you may choose to tackle will require you to extend the UI. If you prefer to ignore the given interface code, you may implement your own UI using whatever libraries you wish, provided that the code compiles and runs on the workstations in MECA. Alternately, you may prefer to create a simple batch program that runs on the command line, e.g.

machine% project2 -noise 0.47 infile.ppm outfile.ppm

It's not elegant, but if you hate graphical user interfaces, it may be the way to go.

Required features (15 points total)

1. Random noise. The code for this is provided as an example.

2. Quantization. Use fewer than 8 bits per color channel.

3. Gamma correction. Hearn & Baker section 14-3 or Foley et al section 13.1.1.

4. Brightness. See Graphica Obscura.

5. Contrast. See Graphica Obscura.

6. Saturation. See Graphica Obscura.

7. Sharpening. See Graphica Obscura.

8. Threshold.

9. Random dither. Black and white.

10. Ordered dither. Black and white.

11. Floyd-Steinberg error diffusion. Black and white.


Optional features
The following list shows the optional features in order of increasing difficulty. The number in front of an item indicates how many points it is possible to get for that item.

(1) Generate histograms of distributions in each of the color channels. You could use any program to actually plot the result. gnuplot is fairly easy, or you could write your own program, maybe even using postscript (for a second point).

(2) Scale the image. Blur and then subsample to make the image smaller; supersample and then blur to make it larger.

(2) Rotate.

(2) Color versions of the required dithering operations 9-11 above.

(2) Edge detection.

(4) Choosing a good color table for the given image and color dithering.

(4) Image compositing. You will somehow have to generate the alpha channel.

(4) Editing history. Collect a list of transformations to be applied to an image and be able to save/load/apply this list.

(6) Effects. (Emboss, lens flare, fish eye, ripple, etc.)

(?) Anything else you can think of. Ask a TA if you want to know how many points it is worth.


Hints
Keep an eye on the hints that will appear during the course of this project, from frequently asked questions, precepts, etc.

Credit
Each item on the list above shows the number of points available for implementing the optional features described. Partial implementations will receive partial credit. To receive "full credit" for the assignment, you will have to implement all the required features (15 points) as well as 5 points worth of optional features. If you receive close to the equivalent of full credit for all your projects (170 total points are possible) you will get an A for the class.
After full credit on the assignment, you may receive "extra credit" up to 25 points by implementing more optional features, but the extra credit points only count half as much as the optional credit points. For example, if you implement the full 15 required points, as well as 15 points more worth of optional features, your score for the assignment will be 15 + 5 + 10/2 = 25. The super-enthusiastic among you (who happen to have lots of time on your hands) may wish to implement even more features, extending your score past 25. All points after 25 count one quarter, so it will be very difficult to reach 30.

Last update: Sun Nov 30 18:08:22 EST 1997