The purpose of this assignment is to create a morphing
program. Morphs are used for special effects in movies and
advertisments to give the illusion of a metamorphosis from one figure
to another. Our project is based on the original morph described by Beier and Neely at Siggraph in 1992 (download 7.4Mb PDF)
The user interface will be
implemented in RapidApp and Inventor. The Inventor code is provided
for you, as is a simple interface built in RapidApp. You are
encouraged to build a better RapidApp interface on your own, after you
are done with the required parts of the assignment.
To get started, download the user-interface, or (if that doesn't work) make a copy of the directory (in MECA)
These files may be unpacked in your directory by typing:
% gunzip project1.tar.gz
% tar xvf project1.tar
% rm project1.tar
The first thing to try is to run the supplied demo program:
From the File menu, select Open and load in min_em.cfg. Look here for a description of the user interface. Try looking at a few intermediate images & warping grids ...
Now try compiling and running the provided UI skeleton:
Implement the part of the user interface that manages the line pairs used for morphing.
Implement the saving and loading of the configuration file. See the hints page for details on the file format.
Write code to perform line segment interpolation (using endpoint interpolation)
Implement the direct and inverse mapping functions (in the Beier/Neely paper these are called forward and
reverse mapping respectively).
Implement the morphing code. See the Beier & Neely paper.
Allow the user to choose between viewing the morphed image, the initial image warped to the intermediate position of the lines, or the warped final image.
The user should also be able to toggle the display of the feature lines in the middle window.
|8.||Make two movies, one showing a morph from you to the next person in the class and another one from the previous person to you. We will send out picture assignments next week.|
Replace the provided GUI with a better one: either use this recipe to create a GUI with resizeable windows, or design your own using RapidApp.
Implement better line interpolation, using center, length and orientation interpolation
Add a button to fade out images, in order to see the feature lines better.
Preview mode. Since computing morphed frames takes quite a while, allow the user to have a faster,lower quality mode in which the morphed image is computed at a lower resolution.
Add a menu toggle saying whether or not to use lines on the edges of the images when doing the morph.
These lines would try to keep the warped images rectangular. They could have low weight and fast drop-off to avoid influencing the user-drawn lines.
Run the profiler on your program to see where most of the time is spent. Suggest ways to make your program faster. You should hand in a writeup of your evaluation, as well as any performance improvements you were able to make.
Add a GUI feature that would allow the user to change the morphing parameters (a,b,p) associated with a given line pair
Allow points instead of (or in addition to) lines, for specifying feature correspondences.
Display a progress bar when writing a movie. The bar should be updated at least after each frame is computed.
|(2)||Antialias by supersampling (possibly jittered) - see Foley.|
Use the Image Format Library (see man 3 IFL) to be able to load and save arbitrary image formats.
GUI and back-end to allow users to edit two video clips, rather than just still images.
|(?)||Any other feature you
find interesting. Ask a TA if you want to know how many points it is worth.
To get extra credit on the assignment, you may choose to implement more optional features. These point values are somewhat fuzzy in that you can do an amazing job and get significantly more than the value here. Likewise, you can do a shoddy job and get less. Also, please don't worry about somebody ``blowing the curve'' by doing everything. We'll have a reasonable upper bound on the grades.