Is there any way of converting a 2D image captured by a normal web camera to be converted into a 3D model? I'm using C# so any algorithm based in C# would be helpful.
-
1what do you mean by a 3D plane? – Mat Jul 17 '11 at 13:36
-
Sorry about that. What i actually meant was a 3D model. – Kasun Peiris Jul 17 '11 at 13:40
-
as far as i know you need two webcams, and even then it is not easy.. check out the ms kinnekt and associated open source projects. – Mario The Spoon Jul 17 '11 at 16:47
4 Answers
This is an active research topic, and is far from easy.
Make3D used supervised learning (one form of Artificial Intelligence) to calculate a huge number of coefficients. Those are then used to estimate the depth-map from images.
They have some code on their site, but it is for Matlab, not C#.

- 86,735
- 21
- 136
- 138
not without any additional information.
you might be able to project the 2d image onto a modelled 3d surface. note: it is funny to say '3d plane' as a plane is typically 2d.

- 16,480
- 1
- 37
- 55
-
Its an AR application. I want to track the hand of the user and place a 3D model on top of it. So that the model will follow the movements of the hand (such as rotate, pan etc). This is what I want to do actually. Is there anyway of doing this? – Kasun Peiris Jul 17 '11 at 13:42
I want to say "Print it out", since a plane means a flat surface in the 3D world, like a piece of paper.
But really, you just want to provide a third dimension value for each point. So decide where in your 3D space you want it to be, and do the necessary maths. For example, if you want it on a "wall", then map your x,y coordinates to x, 0, z instead.
-edited for new question...
You need to work out how far away each point is from the camera. Very hard to do, as the camera can't tell how far the light has travelled.

- 15,625
- 5
- 44
- 58
If you have more than one high(medium) quality image taken from different camera position it's possible. This process called "structure from motion"
http://en.wikipedia.org/wiki/Structure_from_motion
and usually include very heavy and complex calculation. The one exception is if the images are taken by stereocamrea or aligned cameras from fixed predefined positions. No way to do it in C#. C# is pretty useless for computer vision applications. There are open sourced GPL libraries for it, like Bundler and PMVS
http://phototour.cs.washington.edu/bundler
Hand tracking is others quite different tasks, in some sense no less complex, though brute force structre from motion may work for hand tracking. There are several approach for precise hand tracking, some based on active shape model, or active appearance model, more simple are based on feature point tracking, which could work in your case. But even simplest approach is quite complex and can not be relied in one post. You can google, there could be open sourced library for hand tracking too.

- 290
- 2
- 7