-2

I need to convert a 2D image into 3D in my ios application. How would I do this in my ios application? What are the frameworks I need to use? Will OpenGL-es helps in this? Or are there any other packages in IOS to do this? What are the steps do I need to follow to make a 2D image to 3D?

Dan
  • 5,153
  • 4
  • 31
  • 42
Maulik Vekariya
  • 554
  • 7
  • 19
  • 4
    How do you plan to make an 2D image 3D, what do want to make 3D about the images? Also bear in mind that this is not going to be an easy task, since you are missing information in 2D than will be need in 3D. – rckoenes Jul 30 '13 at 14:17
  • Similar questions has been asked multiple times on stackoverflow. – Rajeev Barnwal Jul 30 '13 at 20:12

2 Answers2

1

I'm not sure how you plan on doing this programmatically as a 2D image doesn't have any Z-axis information other than 0.

Take a simple 2D square for example and you want to make it into a cube. Your square has 4 points of data representing its corners: x1y1, x2y2, x3y3, x4y4. To "convert" that square into a cube you now need to add the z-axis data on those points AND provide the coordinates for the missing 4 sets of data since your cube has 8 coordinate references (x1y1z1 - x8y8z8) AND provide which points are connected to each other. That's just assuming a planar shape with no other depth or curvature. You also have no idea what the non-visible sides of the 2D image look like.

The only way I can see this as even slightly feasible is if you allow the user to add their own points on the screen (allowing for manually editing of depth since your screen can't infer depth) and decide which existing points to connect the new points to. At this point, though, you're no longer doing a conversion...

Dan
  • 5,153
  • 4
  • 31
  • 42
1

I think you should clarify a little bit what you are trying to achieve. There are no ways that I would know of to automatically find depth information from a single 2d image. However, if you are talking about something shot in stereo, then you could look for features present in both images and figure out the depth of each feature relative to each other.

And in the case of a video or image sequence, there are a few interesting papers, but one approach I find specifically interesting is "Depth Extraction from Video Using Non-parametric Sampling" by Kevin Karsch, Ce Liu and Sing Bing Kang.

you can find it here: http://www.kevinkarsch.com/depthtransfer/eccv12-depthtransfer.pdf

sherba
  • 11
  • 2