Possible Duplicate:
How to measure height, width and distance of object using camera?
Is it possible to measure the distance of an object from an android phone using only camera? are there any coding for it?
Possible Duplicate:
How to measure height, width and distance of object using camera?
Is it possible to measure the distance of an object from an android phone using only camera? are there any coding for it?
it should be possible to tell where the camera is focused. You'll need to know a little bit of information about the camera's lens, since each phone is different.
You can probably get this data from the EXIF data that is embedded in the jpeg image file. The exif might acutally contain information about the focussing distance, but this likely camera dependent.
Here is a hyperfocal distance and depth of field calculator as an example.
http://www.outsight.com/hyperfocal.php
You should be able to come up with an estimated distance using these. It won't be 100% accurate.
There is a related question here: How to measure height, width and distance of object using camera?
and there is also this that might be of some use perhaps? https://market.android.com/details?id=kr.sira.measure