views:

502

answers:

5

I'm building a small app and I need to be able to morph one image into another. Any pointers would be appreciated.

A: 

This link could be of interest:

http://www.owlnet.rice.edu/~elec539/Projects97/morphjrks/themainpage.html

Stefan
+1  A: 

If you remember the Michael Jackson Video for Black or White, they used the Beier-Neely algorithm. I did a project as an undergraduate using that algorithm for a graphics class and found it pretty straight forward to use.

If you just need something to perform morphing, there is probably an implementation out there that you could use.

If you need to build something and include it in your application, this may help get you started:

http://www.hammerhead.com/thad/morph.html

Nick Spilman
A: 

There's libmorph (GPLv2, C api), as used by xmorph and tkmorph/gtkmorph. There used to be a plugin to GIMP as well, but I know it was broken for a while; I don't know if it ever got updated.

You provide source and destination images, a mesh for each to identify corresponding points, and it will output interpolations between them (or animated transformations).

puetzk
A: 

Thanks for these pointers! I think I need to morph the image on the client, in Flex/Flash. My current thought is that I'll interpret a homework assignment that I found:

http://cns-web.bu.edu/~oph/cs580_assign1/p1.html

into ActionScript and build a UI around it. It uses the Beier-Neely algorithm that nickspilman mentioned. I'll let y'all know how it turns out.

Vineel Shah
+1  A: 

Wondering if anyone could throw some pointers on planar mesh morphing (eg. converting a rectangular surface to cylindrical/parabolic surface). Some detailed algorithms/code links will be greatly appreciated.