Does anybody know good graphical morphing code or algorithm?

末鹿安然 提交于 2019-12-22 10:28:31

问题


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:


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



来源:https://stackoverflow.com/questions/459793/does-anybody-know-good-graphical-morphing-code-or-algorithm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!