Does anybody know good graphical morphing code or

2019-05-10 08:01发布

问题:

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

回答1:

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



回答2:

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.



回答3:

This link could be of interest:

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



回答4:

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



标签: graphics