Thanks for your input!. The method that you have described would be my first choice but I didn't know that there is enough support to do that.I assume when you say ML-enabled, you are referring to cameras supported by Magic Lantern (excuse my ignorance ). And in this case something like a T2i should do the job, right?
Yes the lens part is important - based on the research that I did most lenses report distance at a fairly coarse resolution (the whole focus range might be divided into as low as 7-10 'distance bins'). And the resolution is specially worse at longer distances. The higher-end lenses seem to be able to report at a finer scale. Someone at exiftool forum was able to give me the exact focus distances steps for the EF-S 17-55mm lenses which seems to have a good enough resolution for my purposes. And yes I don't need an exact depth map, a sort of relative one with coarse distance information is fine.I looked up a bit on focus stacking using magic lantern and it is not clear to me that what is granularity of a focus step during focus stacking . In theory it may not even be required to use the distance information from the lens. The focus step count is in itself a measure of the distance if calibrated properly.
You want to extract depth information from some static scene, right?As suggested before, focus stacking from Magic Lantern may help. The smallest focus step is the lowest focus increment in EOS utility, in LiveView (this is very small, usually the focus change is barely noticeable, even with 50/1.8 lens).You can also write down the focus distance (as reported by the lens) and interpolate it using raw focus steps, to get a better resolution. The relationship between raw focus steps and physical distance is nonlinear.
Is the scene static ?I am sure you will be aware of many of the papers published regarding depth maps from a single camera.Here is one http://vision.ai.uiuc.edu/?p=320
enfuse -o result.jpg --exposure-weight=0 --saturation-weight=0 --contrast-weight=1 --hard-mask --save-masks *.jpg
for FILE in *.tif; do convert $FILE $FILE.jpg; done