|
Read the Beier-Neely 1992
Siggraph Paper, Feature-Based Image Metamorphosis:
http://www.cs.princeton.edu/courses/archive/fall00/cs426/papers/beier92.pdf
http://www.hammerhead.com/thad/morph.html
You can use the code you
developed in Assignment 1 as a starting point, but you will have to
use FLTK ( http://www.fltk.org )
to augment the user interface for this assignment. To assist
with your FLTK development, I will release some starter code (will
email soon and add to this page as well). Please feel free to
learn from one another about how to debug and build FLTK programs.
User Interface (25 points):
-
Load Images: The
user interface must provide a means for the user to type in the
names of the source and destination images (no interactive file
selection widget is required). Your program
can use any image format you choose, but the image sizes should
be 256x256. You can find a BMP image loader in this
assignment code from my intro course: http://www.cs.virginia.edu/~gfx/Courses/2001/Intro.fall.01/Exercises/Exercise2/
. Another useful site: http://www.seas.gwu.edu/~graphics/cs206/opengl_save_howto.html
.
-
Edit feature
segments: Your user interface must allow the user to
interactively place, move, and remove line segments on the
source and destination images.
-
Interactively test
morphing: Provide a type-in box that the user can use to
enter a number between zero and one. This box will be used
to control what intermediate image is rendered to the GUI.
-
Load and store
feature segment descriptions: The user interface must
provide a way to save and load a line segment description file.
-
Save images for a
movie: Provide a button that causes a two-second sequence of
images (60 images) to be written to the directory from which the
program was run. Name the images however you wish, but
make sure they are listed in order (note: prepend index numbers
with leading zeros to preserve ordering). See the GW URL
above for info about writing TIFF files. Hint: make the
rendered images small at first so debugging will be faster.
Graphical Environment (25
points):
-
Use OpenGL for the
rendering.
-
Create an orthographic
camera.
-
Create three squares,
positioned side by side, and texture map the source and
destination images on the left- and right-most squares
respectively. The images should be 256x256. The
center image will be used to display the texture map of
intermediate morphed images.
-
As the user clicks the
mouse (and the interface buttons), render the appropriate lines
on the source and destination images. If an intermediate
frame of the morph is being rendered to the middle square, also
superimpose the interpolated line segments. Note you may
use glut or fltk to obtain mouse positions and mouse clicks.
Morphing Algorithm (50 points):
Extra Credit:
-
5 pts - Add type-in
boxes to interactively adjust the a, p, and b parameters.
-
10 pts - Implement an
antialiasing technique.
-
Do the points even
matter? The Beier-Neely algorithm has been industry tested and
it provides good results, though it's a bit slow. A recent
paper by George Wolberg, Recent
Advances in Image Morphing, discusses some alternative
methods that you may wish to implement instead of Beier-Neely.
The radial basis function, thin-plate splines, and energy
minimization papers he references are interesting but be careful
not to get caught at the deadline without a working
implementation.
-
Others? I'm easily
impressed.
|