# 3D reconstruction of an image based on depth of intensity levels?

Is there anyway of segmenting objects based on how far they are from the viewer?

Can color values assess this sort of a thing for us? How will intensity levels help in determining how far the object is from the viewer?

Another image:

• This is not segmentation, it's 3D reconstruction. Do you have other images that capture the scene from a different view or under different lighting conditions?
– Emre
Commented Apr 14, 2012 at 23:08
• i have provided another image with a different angle
– vini
Commented Apr 16, 2012 at 11:10
• Now you can follow en.wikipedia.org/wiki/3D_reconstruction_from_multiple_images
– Emre
Commented Apr 16, 2012 at 18:05

This is an extremely difficult task, one which is a very active line of research. I've managed to find a semi-recent paper on the subject entitled " 3-D Depth Reconstruction from a Single Still Image". I won't go into the details, but here's a few things that this paper found that can be used.

1. Textures: If you see a given texture, they can help you figure out how far something is away. The wood texture here would be quite ideal for this.
2. Fixed object sizes: Identify common objects, see how large they are, and use them to help with depth analysis. The phone book, soda bottle, etc should work well with this.
3. Focus: If you know how the picture was take, focus can help you identify ranges.
4. Shadows- If you know where the light was coming from, shadows can help you identify how tall objects are, and thus how far they are away.
• Thanks for that reference yup will look into that however what more methods could be considered while approaching this problem
– vini
Commented Apr 11, 2012 at 14:04
• Most 3D techniques are found in research papers could i found codes related to these topics?
– vini
Commented Apr 13, 2012 at 8:09
• @vini Cornell has a research page with depth estimation from a single image and shares code. Commented Apr 14, 2012 at 20:53
• Yes i do have that code however which file to run is a problem in it
– vini
Commented Apr 15, 2012 at 12:22

See this code from matlab website: "Depth from gradient":

http://www.mathworks.com/matlabcentral/fileexchange/45269-dfgbox