Generating 3D image from 2D image file
this is actually my final year project, I'm required to get the above application up and running using Visual C and OpenGL. Being a novice with at both, this will be a tough project for me. Fortunately this website with its toturials have been a great help for me.
The application is suppose to be able to generate a 3D view of a 2D image file (like an ID card photo). Can someone gives me a hint or two on how to do this. Or suggest me topics that i should research on.
Thanks.
I tried to implement this.. "effect" in a game-project a couple of weeks ago, and the basics are really simple:
scan through every pixel of the image, and create a quad with the dimension of 1*1 for every corresponding pixel and it's color. Then traslate each of these quads 100's of units away from the camera an voila.
scan through every pixel of the image, and create a quad with the dimension of 1*1 for every corresponding pixel and it's color. Then traslate each of these quads 100's of units away from the camera an voila.
Ethereal
Doesn't that just give you a smaller - and still 2d - image?
I thought this would require edge-detection and the like, to extract a scene-perspective... And then detect objects in the picture, given this perspective. Or something like that, anyway :)
[Edited by - stein on November 8, 2004 3:14:09 AM]
I thought this would require edge-detection and the like, to extract a scene-perspective... And then detect objects in the picture, given this perspective. Or something like that, anyway :)
[Edited by - stein on November 8, 2004 3:14:09 AM]
| Stein Nygård - http://steinware.dk |
I think he needs just a 3d view :-).
Making the content of an image 3d is not possible only with 1 image. Maybe fake 3d when you convert the image in grayscale and apply the method of displacement as with heightmapping or calculate surface normals on every pixel and use it for lighting calculations like relief texturing or bumpmapping does.
but i would recommend that you follow the tutorials from nehe.gamedev.net or www.gametutorials.com.
They have very good texturing tutorials.
Making the content of an image 3d is not possible only with 1 image. Maybe fake 3d when you convert the image in grayscale and apply the method of displacement as with heightmapping or calculate surface normals on every pixel and use it for lighting calculations like relief texturing or bumpmapping does.
but i would recommend that you follow the tutorials from nehe.gamedev.net or www.gametutorials.com.
They have very good texturing tutorials.
This is the well-known (and very difficult) Shape from Shading problem. Googling that term will give you some information on the issue, but probably not a great deal. I have the basics written down somewhere. I'll try and find them and post them for you later.
Enigma
Enigma
shape from shading wont work with only one picture, its based on a displaced lightsource (2 times), so that you have to use at least 3 images (each with a different position of the lightsource taken) and then do some math...
i would recommend 3d-stereo-triangulation method, you only need one camera that takes 2 pictures of the same scene at different positions, and its easier than shape from shading imho, you could also do some sort of light-line-scanner which needs special hardware and so on...
search for 'computer vision' and you should find enough information on this topic
T2k
i would recommend 3d-stereo-triangulation method, you only need one camera that takes 2 pictures of the same scene at different positions, and its easier than shape from shading imho, you could also do some sort of light-line-scanner which needs special hardware and so on...
search for 'computer vision' and you should find enough information on this topic
T2k
The classic Shape from Shading research is not based on displaced lightsources, but on recovering shape information from a single image by solving the Image Irradiance Equation, usually assuming known lightsources.
Enigma
Enigma
Are you sure you don't want to just texture the ID card onto a 3d quad and have it spin around a bit?
Extracting 3D info from 2D pics is a tough problem. I've worked on a related problem of generating interpolated camera views of a scene. I used edge detection and matching - it worked OK. You can see the results here (staring my big Lab). Generated 40 interpolated virtual cameras from 3 real ones.
http://www.flysim.com/data/cossmall.avi
-J.R.
http://www.flysim.com/data/cossmall.avi
-J.R.
thanks for all the tips you all. i'll do more research on them. i've checked JR's cossmall.avi.. its a great piece.
i'm still new so i'm going to ask this silly question :) i've seen many samples on 3D terrain creation, is it near to what i'm supposed to do ?
i advance my millions of thanks everybody. tq.
i'm still new so i'm going to ask this silly question :) i've seen many samples on 3D terrain creation, is it near to what i'm supposed to do ?
i advance my millions of thanks everybody. tq.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement