iOS的 - 2D图像转成3D [英] iOS - 2d image turn into a 3d

查看:327
本文介绍了iOS的 - 2D图像转成3D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被检查出这个很酷的应用程序称为 Morfo 。根据其产品说明 -

I was checking out this cool app called Morfo. According to their product description -

使用Morfo快速把你的朋友的脸的照片到   说话,跳舞,疯狂的3D人物!一旦捕捉到,你可以让你的   朋友说,你想要的任何东西在一个愚蠢的声音,摇滚,化妆,   运动一对巨大的绿色猫的眼睛,一下子获得300磅,等等。

Use Morfo to quickly turn a photo of your friend's face into a talking, dancing, crazy 3D character! Once captured, you can make your friend say anything you want in a silly voice, rock out, wear makeup, sport a pair of huge green cat eyes, suddenly gain 300lbs, and more.

如果你把史蒂夫·乔布斯和放大器的普通2D图像左右;其提供给这个应用程序也将其转换成图像和放大器的三维模型;用户可以与其进行交互。

So if you take a normal 2D image of steve jobs & feed it to this app it converts it into a 3D model of that image & the user can interact with it.

我的问题是如下 -

My questions are as following -

  1. 在他们的情况怎么样呢?
  2. 如何在这个iPad是可能的吗?
  3. 是不是计算密集型渲染和转换2D图像转换成3D?

任何指针,指向该做的objectiveC网站或库是非常AP preciated。

Any pointers, links to websites or libraries in objectiveC which do this is very much appreciated.

更新:本演示该产品在这里显示了如何morfo,使用模板机制来进行转换。即后2D图像被馈送,需要设置面,其中所述眼睛的位置,大小和安培的界限;长度嘴唇。然后熄灭以将其转换成3D模型。这是怎么做的一部分?什么框架或库,他们可能会使用?

UPDATE: this demo of this product here shows how morfo, uses a template mechanism to do the conversion. i.e. after a 2D image is fed, one needs to set the boundaries of the face, where the eyes are located, size & length of lips. then it goes off to convert it into a 3D model. How is this part done? What frameworks or libraries they might be using?

推荐答案

这是一个广泛的问题,但我可以在3D渲染是如何工作的正确的方向指向你,相信我这是几十年来的工作背后一个巨大的主题并多放这里。不知道如何加快速度你是在3D渲染技术,所以我会给你纹理的基本思路,并指出你一套良好的教程。

This is a broad question but i can point you in the right direction of how 3D Rendering works, trust me this is a huge subject with decades of work behind it and to much to put here. Not sure how up to speed you are on 3D Rendering techniques so i will give you a basic idea of texturing and point you to a good set of tutorials.

  1. 他们的情况怎么样呢?
    我们的想法是,在3D渲染,三维模型可以用公知的作为纹理映射的2D图像纹理。您可以使用2D图像,将其套3D模型,是一个简单的原始的像一个立方体或更高级的领域,如经典的茶壶或人头模型等纹理可以从任何地方,我都用相机饲料在过去网格纹理与来自摄像机的流视频,我已经从相机其中s怎么会有这样做使用的照片。因此,这是怎样的面孔呈现给三维模型。

  1. How are they doing this?
    The idea is that in 3D Rendering, 3D models can be textured with a 2d image known as a texture map. You use a 2D image and wrap it around a 3d model, be that a simple primitive like a sphere of a cube or more advanced such as the classic teapot or the model of a human head e.t.c. A texture can be taken from anywhere, I have used the camera feed in the past to texture meshes with the video from the camera stream, I have used photos from the camera which s how there doing it. So this is how the face is rendered to the 3D Model.

这是有效的?
在iOS和大多数移动设备的3D渲染使用利用OpenGLES硬件加速。在问候你的问题,这是非常快这取决于你如何实现你的渲染code。

Is this efficient?
On iOS and most mobile devices 3D rendering uses hardware acceleration utilizing OpenGLES. In regards to your question this is really fast depending on how you implement your render code.

所提到的anticyclope它使用映射(在视频规模旋转模板)的方式使您可以纹理拟合模型,并把它们的存在使code部分的眼睛。

The way it uses the mapping (scale rotate template in the video) as mentioned by anticyclope allows you to make the texture fit a model and also place the eyes which are part of there render code.

所以,如果你想拿起这件事我建议从地上爬起来读书杰夫·拉马什教程作为底漆:

So if you want to pick this up i recommend reading Jeff Lamarche Tutorial "from the ground up" as a primer:

http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html

二给我在OpenGLES,对于一般的设计和平台的具体阅读4本书。我推荐这本书:

Second to that i have read about 4 books on OpenGLES, for general design and for platforms specifics. I recommend this book:

<一个href="http://www.amazon.co.uk/iPhone-Programming-Developing-Graphical-Applications/dp/0596804822/ref=sr_1_1?ie=UTF8&qid=1331114559&sr=8-1" rel="nofollow">http://www.amazon.co.uk/iPhone-Programming-Developing-Graphical-Applications/dp/0596804822/ref=sr_1_1?ie=UTF8&qid=1331114559&sr=8-1

这篇关于iOS的 - 2D图像转成3D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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