Assignment 1: Painterly rendering

CSC 2521: Non-Photorealistic Rendering, Fall 2007
Deadline: October 23, at 4:10pm sharp

This assignment has two parts, an interactive Impressionist applet and an automatic stroke-based filter. If you wish to substitute a different project, please get my approval well beforehand.

1. Impressionist applet

Implement a version of Haeberli's Impressionist applet, a version of which is described in his SIGGRAPH 90 paper "Paint By Numbers;" his Java applet may also be found on the web. Specifically, your program should load a color image as input. The user interface is a canvas, initially blank. Clicking and/or dragging on the canvas should place simple strokes, with color sampled from the source image. User interface controls (a GUI or keypresses) will be used to set the size of the strokes.

In addition to the basic applet, you should add two additional features to enhance the visual style of the results. These can include, e.g., automatic or user selection of stroke orientation (instead of using circular strokes); an interface for defining a vector field for orientations; textured strokes; paint texture (see my NPAR 2002 paper); watercolor effects, etc.

2. Painterly filter

Implement one of the automatic image filtering algorithms that we are reading in class before October 9. Some of these papers operate on video; for these, it is sufficient to just implement the single-frame version (except for the Bousseau algorithm, which is too simple to just apply to a single image). Add at least one additional feature, such as those listed above, or (if you're feeling really ambitious) video processing.

What to submit

For each of the above programs, submit two or more images produced with each of the two parts of the assignments. Submit a write-up saying what you implemented. Explain which extra features you implemented, and explain how the images submitted demonstrate the features. Are these extra features worthwhile? Why or why not? If not, how could they be improved?

40 marks will be given for each part of the assignment, plus 5 for each additional feature and 5 for the writeup. 10% will be deducted per day for late assignments.

Provide your images for me electronically. I'll put them on the course website. If you provide an HTML document with your images, I'll put that online too.

Coding

You may implement the assignment in any environment you wish; I recommend C++, Java, or Python.

To find code for OpenGL rendering of strokes, try this page: http://www.dgp.toronto.edu/~hertzman/stroke/. Porting this code to Java should be pretty easy. You may find these libraries helpful: Python Imaging Library, PIL_usm libart.

To set up 2D rendering in OpenGL, try the following sequence: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0.0f, (GLfloat) outputWidth, 0.0f, (GLfloat) outputHeight, -1.0f, 1.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glViewport(0, 0, outputWidth, outputHeight); where outputWidth and outputHeight are the dimensions of the output window.