Project 1: ImpressionistAssigned: Thursday, 13 January, 2000
Due: Tuesday, 25 January, 2000 (appointed demo time)
Artifacts Due: Friday, 28 January, 2000 (by TGIF)
Project DescriptionImpressionist is an interactive program that creates pictures that look like impressionistic paintings. It is based on a paper and a program by Paul Haeberli. You can find a Java implementation of his program here.
To create an impressionistic picture, the user loads an existing image and paints a seqence of "brush strokes" onto a blank pixel canvas. These brush strokes pick up color from the original image, giving the look of a painting. To see some samples that were generated with the sample solution, click here.
Project ObjectiveYou will add the functionality to a skeleton version of the Impressionist program, which we will provide. The purpose of this project is to give you experience working with image manipulation, OpenGL primitives, user-interface design, and image processing.
Getting StartedGrab a zipped copy of the skeleton program source code. For NT users, open Impressionist.dsw to build and run the program from within Developer Studio. For Linux users, go to the directory and type 'make'. Of course, you need to have fltk installed on your machines at first. The binary version of fltk will be provided at the same time as well. Or, you can build it on your own.
Explanation of the Skeleton ProgramThe skeleton program we provide does very little. It allows you to load the original image (which must be a 24-bit uncompressed BMP file), and save the painted version. Brush selection is done via a modeless dialog ("File/Brushes..."). There is one brush implemented (points) and a slider for controlling the brush size.
You can find some sample input images in the BMP format here.
Required ExtensionsYou must add the following features to the Impressionist program:
To see what these features should look like when they're done, you can look at the sample solution here. Your implementations of brush strokes, brush direction controls, etc. do not have to behave exactly the same as the sample solution, but they should demonstarte the same functionality. Also, note that the sample solution does more than you are required to do (i.e., it implements some of the bells and whistles).
- Implement 5 different brush types: single line, scattered lines, scattered points, (filled) circles, and scattered (filled) circles.
- Add sliders to control various brush attributes. You need to include sliders for the line thickness and brush angle, in addition to the existing brush size slider.
- Add the ability to control the brush direction. The stroke direction should be controlled four different ways: using a slider value, using the right mouse button to drag out a direction line, using the direction of the cursor movement, and using directions that are perpendicular to the gradient of the image. You can use a radio box to allow the user to select which method to use.
- Allow the user to change the opacity (alpha value) of the brush stroke.
Project ArtifactWhen you are done with this project, you will create a project "artifact" to show off the features of your program. For the Impressionist artifact, you will create an impressionistic painting from an image of your choice. We will then create a gallery of all the paintings on the course web page. Please note that you are not allowed to use other's program or sample solution for your artifacts.
Bells and WhistlesHere is a list of suggestions for extending the program. You are encouraged to come up with your own extensions. We're always interested in seeing new, unanticipated ways to use this program!
To give your paintings more variety, add some additional brush types to the program. These brush strokes should be substantially different from those you are required to implement. You will get one whistle for each new brush.
The skeleton program allows the user to paint outside the boundary of the paint rectangle. Change this to clip brush strokes to the region as they're being painted.
When using your program, you currently can't see what part of the original image you're painting. Extend the program so that when you're making a brush stroke, a marker appears on the original image showing where you're painting.
A different solution to the problem of not being able to see where you're painting is to show a dimmed version of the painting on the canvas. Add a slider that allows the user to fade in or fade out the original image beneath the user's brush strokes on the canvas. (Beware, this bell and whistle is more difficult than it looks).
To make your painting more interesting, add "alpha-mapped" brush strokes. In other words, allow the user to load a bitmap representing a brush stroke. This bitmap would contain an alpha value at each position. Then when this brush is used to draw, a single color would be selected from the image, all pixels in the brush bitmap would be set to this RGB color (without changing the alpha value), and this partially transparent bitmap would be painted on the canvas. A new color would be used each time the brush is drawn.
It can be time-consuming to paint an image manually. Add a feature so that a whole painting can be created automatically. The user should only have to specify a brush type, size, and angle to use. Then the program should automatically paint brush strokes over the entire image, using a randomized brush order and varying the brush attributes slightly as it goes (to increase realism).
At times, you may want the brush strokes to follow the gradient of a different image than the base image. Add a button(s) that will cause the direction of brush strokes to be automatically determined from a user specified image.
The "accuracy" of the painting can be also be improved by clipping long brush strokes to edges in the image. Allow the user to load a black-and-white image that represents the edges in the picture. Then add a checkbox so that the user can turn on edge-clipping, which will automatically clip brush strokes at edges in the image.
Use the image processing techniques described in class to automatically find the edges in the base image. Once you have found the edges, add a button to the user interface that will allow the user to select whether or not the brush strokes should be clipped to the edges in the picture.
Implement a multiresolution automatic painting technique. See Painterly Styles for Expressive Rendering.
Implement a curved brush that follows the image gradient. See Painterly Styles for Expressive Rendering.
Extend the Impressionist program to work with video. The user should be able to load a series of images from a video and set up some initial parameters, and the program should automatically generate an impressionistic version of the video. The video should exhibit temporal coherency.
- Paint By Numbers: Abstract Image Representations, Paul Haeberli, Siggraph 1990.
- Processing Images and Video for An Impressionist Effect, Peter Litwinowicz, Siggraph 1997. Also visit his company, RE:Vision Effects.
- Painterly Rendering with Curved Brush Strokes of Multiple Sizes, Aaron Hertzmann, Siggraph 1998. Also visit his homepage.
- Statistical Techniques for the Automated Synthesis of Non-Photorealistic Images, S. M. F. Treavett and M. Chen, Proc. 15th Eurographics UK Conference, 1997. Also visit the homepage.
- Stylized Depiction in Computer Graphics (http://www.red.com/cwr/painterly.html)