从 2D 图像创建 3D 效果

发布于 2024-10-15 01:48:26 字数 650 浏览 3 评论 0原文

我有一个随机的二维图像。我希望能够以 3D 形式呈现图像。这不必非常详细,即使图像被任意分成几层,就像儿童读物中的弹出剪贴画一样。

目标是给定图像在直接观看时看起来正常,但如果观看者向左、右、上、下移动/倾斜,就会出现 3D 效果。

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

这完全是过度杀戮: http://make3d.cs.cornell.edu/

这可能是在正确的轨道上: 我

的理想的实现是使用 ImageMagick 的自动化 PHP 脚本,将图像输入并输出结果(按优先顺序):

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

是否已完成(上述理想实现之一),或者有人知道如何完成全部或部分操作吗?

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.

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.

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

This is complete over-kill:
http://make3d.cs.cornell.edu/

And this is probably on the right track:
http://www.imagemagick.org/Usage/distorts/#perspective

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. Images representing each layer, from
    nearest to deepest (closer to the
    childs pop-up book layer analogy)
  2. 5 images representing the said views
    (direct, left, right, top, bottom)

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

屋顶上的小猫咪 2024-10-22 01:48:26

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

  • 你想要它更简单(从一组固定角度返回图像而不是演练)
  • 你想要它与 imagemagick 和 PHP

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

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

对于你问题的第二部分,你想要做的事情背后的理论已经得到了相当充分的研究。请参阅此处获取深度估计论文列表。 这里是源代码中的内容。

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:

  • you want it simpler (return images from a fixed set of angles as opposed to a walkthrough)
  • you want it with imagemagick and PHP

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文