Creating a 3D effect from a 2D image

前端 未结 1 341
陌清茗
陌清茗 2021-01-03 17:21

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 l

相关标签:
1条回答
  • 2021-01-03 17:43

    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 讨论(0)
提交回复
热议问题