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

Morphing

7-23-2003

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.
ImageMorphing.ppt
imageMorphMultiLine.py

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

7-16-2003

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.
example.py

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.


7-9-2003

Code: imageMorphMultiLine.py

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.


7-2-2003

PROGRESS!!!
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: imageMorphMultiLine.py
I still need to do some cleanup, commenting, and more coding.



6-25-2003

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...
originalwarped
Uploaded Image: man.jpgmanmorph.jpg+



Brainstorming ways to accomplish this "easily."

Two Effects at the Same Time:

Fading

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

Warping

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.?

Derek

Links to this Page