View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide



Cleaning up and commenting all of the morphing code. I have added a significant amount of comments and function descriptions. I'm also working on the powerpoint presentation for morphing. Here is what I have so far.

Left to do:
Create zip file of all code, example pictures, and documentation.
Incorporate movie code into morphing.


Working on simpler image morph, but no good results quite yet. Will continue to work on it if other method is still too complex after further and hopefully more clear explanation. Attached is an example of the vector operations used to calculate the pixel coordinates.

If explanation is clear enough, I would like to devote the rest of my time to documenting the image morph code heavily, and providing a user guide with examples.



Morphing Examples:

Mark to David Hasselhoff: This morph was performed over 3 frames using 7 feature lines from each image. The lines were across the eyes, nose, mouth, and hair.
Processing Time: Approx. 13 minutes on P4 1.5 Ghz

Uploaded Image: guzdialhoff.gif

Uploaded Image: guzdialhoff0.jpgUploaded Image: guzdialhoff1.jpgUploaded Image: guzdialhoff2.jpgUploaded Image: guzdialhoff3.jpgUploaded Image: guzdialhoff4.jpg

Man to Cat: This morph was performed over 5 frames using 4 feature lines in the man and cat images. The lines were placed on each eye, the nose, and mouth.
Processing Time: Approx. 13 minutes on P4 1.5 Ghz

Uploaded Image: manCat.gif

Uploaded Image: manOlderSmall.jpgUploaded Image: manCat1.jpgUploaded Image: manCat2.jpgUploaded Image: manCat3.jpgUploaded Image: manCat4.jpgUploaded Image: manCat5.jpgUploaded Image: catSmall.jpg

More feature lines and frames provide smoother morphs, but take significantly longer to process.


I reworked some of the morphing code and here are some of the results:
OriginalWarpedFeature Lines OriginalFeature Lines Warped
Uploaded Image: manOlder.jpgUploaded Image: manOlderMorph.jpgUploaded Image: featureLines1.jpgUploaded Image: featureLines2.jpg
Uploaded Image: cat.jpgUploaded Image: catMorph.jpg
The code works with multiple feature lines to distort the image, and interpolates the lines over frames. I am still working on combining the line interpolation used for warping with the cross-dissolve which blends one image into another. Currently I have each working, but not yet integrated.

Here is the code so far:
I still need to do some cleanup, commenting, and more coding.


Here is what I have so far for the image warping part. So far it doesn't look pretty. My math is off somewhere, but I haven't tracked it down yet.

Based on the line coordinates I used, this should have shrunk the man's head; however, you see it merely smeared diagonally across his face...
Uploaded Image: man.jpgmanmorph.jpg+

Brainstorming ways to accomplish this "easily."

Two Effects at the Same Time:


This is already implemented in one of the slide transitions I wrote. This fades one image into another over several frames.


I need a way to allow the students to draw "feature points" on each image to implement the warping algorithm needed to provide the most realistic effect. The feature points are moved towards each other over a series of frames.

I know there is a way to draw lines with JES using code, but is there an easy interactive way other than using Java MouseListeners, etc.?


Links to this Page