如何在iphone编程中变形两个图像 [英] How to morphing of two images in iphone programming

查看:146
本文介绍了如何在iphone编程中变形两个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iphone编程中对两个图像进行变形。?

how to do morphing of two images in iphone programming.?

推荐答案

你的问题与iphone无关...那种您正在寻找的算法与语言无关,因为它只适用于图像。

Your question is not iphone related.. the kind of algorithm you are looking for is language-agnostic since it just work with images.

顺便说一下,变换两个图像相当复杂,通常你必须

By the way it's quite complex to morph two images, usually you have to


  • 在两个图像上嵌入一个点网格,这两个图像链接应该变形的特征。例如,如果你有两个面孔,你会使用一个连接眼睛,嘴巴,耳朵,鼻子,脸部边缘的网格等等:这两个网格告诉变形者如何将一个点转换为另一个点而另一个混合两个图像

  • 上一步可以自动(使用特定软件)或手动完成。更多的点你会更好地将你的结果

  • 然后你可以做真正的变形序列:基本上你在两个图像之间进行插值(你使用的参数将决定多少将是与第一张或第二张图像相似的最终版本。)

  • 你还应该应用一些混合效果来实际创建一个可信的结果,总是根据变形位置使用参数函数

  • embed a grid of points over the two images that links characteristics that should be morphed. For example if you have two faces you would use a grid that connects eyes, the mouth, ears, the nose, the edge of the face and so on: these two grid tells the morpher how to "translate" a point into another one while blending the two images
  • the previous step can be done automatically (with specific software) or by hand. more points you place better will be your results
  • then you can do the real morphing sequence: basically you do an interpolation between the two images (in which the parameter that you use will decide how much will be the final risult similar to the first or the second image)
  • you should also apply some blending effect to actually create a believable result, always using a parametric function according to the morphing position

这篇关于如何在iphone编程中变形两个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆