|
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 will develop an FLTK /
OpenGL program to allow the user to load images, annotate them, and
generate intermediate morphed images. Choose images of your
choice and use them to create a sixty-frame AVI movie.
Click
here to grab a working version of the program and two test
images.
User Interface (20 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 use the image loader from assignment
1. 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. You may define the nature
of the interface (for example, how does the user know when she
is creating/moving/deleting vertices?)
-
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.
You can define the line segment format.
-
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 (20
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):
Movie (10 points)
Extra Credit:
-
5 pts - Add type-in
boxes to interactively adjust the a, p, and b parameters.
-
up to 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.
|