从 2D 图像创建 3D 效果 [英] Creating a 3D effect from a 2D image

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

问题描述

我有一个随机的 2D 图像.我希望能够以 3D 形式呈现图像.这不必非常详细,即使图像像儿童读物上的弹出式剪纸一样被随意分成几层.

I have a random 2D image. I would like to be able to present the image in 3D. This doesn't have to be very detailed, even if the image were arbitrarily broken into layers like a pop-up cutout from a children's book.

目标是直接查看给定图像时看起来正常,但如果查看者向左、向右、向上、向下移动/倾斜,则会产生 3d 效果.

The goal would be that a given image would look normal when directly viewed but that if a viewer were to move/tilt left, right, up, down there would be a 3d effect.

这与这里的这个问题相似但不完全相同:如何使用带有图像的 MATLAB 创建 3D 立体图像工具?

This is similar but not exactly the same as this question here: How to create 3D streoscopic images using MATLAB with image tool?

这完全是矫枉过正:http://make3d.cs.cornell.edu/

这可能是正确的:http://www.imagemagick.org/Usage/distorts/#perspective

我的理想实现是一个带有 ImageMagick 的自动 PHP 脚本,将图像输入并输出(按偏好顺序):

My ideal implementation would be a automated PHP script with ImageMagick take is fed an image and spits out as a result either (in order of preference):

  1. 代表每一层的图像,来自最近到最深(靠近儿童弹出书层类比)
  2. 5 张图片代表上述观点(直接,左,右,上,下)

这是否已经完成(上述理想的实现),或者有没有人知道如何完成全部或部分?

Has this been done (either of the above ideal implementations), or does anyone know how to do all, or part, of this?

推荐答案

就您问题的第一部分而言,听起来您的理想实现是http://make3d.cs.cornell.edu/,除了:

As far as the first part of your question is concerned, it sounds like your ideal implementation is http://make3d.cs.cornell.edu/, except that:

  • 您希望它更简单(从一组固定角度返回图像而不是演练)
  • 您需要使用 imagemagick 和 PHP 来实现

我认为最后一个限制是不切实际的,因为 背后有相当多的数学和计算机视觉这种问题.Imagemagick 将帮助您完成仿射变换等较低级别的图像处理任务,但它并没有真正提供所需的更高级别的计算机视觉功能,例如 3D 图像重建.

I think that last restriction is unrealistic because there's a fair amount of maths and computer vision behind this kind of problem. Imagemagick will help you with lower level-image processing tasks like affine transforms, but it doesn't really provide the required higher-level computer vision functionality like 3D image reconstruction.

所以我的建议是尝试以某种方式解决该限制.如果您使用更合适的工具(例如 C++ 和 OpenCV 或 Matlab,如 Make3D 人员所做的那样)实现该方法,那么您可以将其包装在 CGI 应用程序中,以便您的 PHP 脚本可以访问它.康奈尔大学(Make3D 的作者)不久前也做过类似的事情,但看起来他们不再这样做了.

So my advice would be to try and work around that restriction somehow. If you implement the approach using more suitable tools (like C++ and OpenCV, for example, or Matlab, as the Make3D guys did), then you can wrap that in a CGI application so your PHP scripts can access it. Cornell (the authors of Make3D) had a similar thing going a while back, but it looks like they're not doing it any more.

对于您问题的第二部分,您想要做什么背后的理论已经得到了相当深入的研究.请参阅此处以获取深度估计论文列表.这里是源代码的样子.

For the second part of your question, the theory behind what you want to do has been fairly well-researched. See here for a list of depth estimation papers. Here is what things look like in source.

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

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