开发者

Creating a 3D effect from a 2D image

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜