2

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?

Community
  • 1
  • 1
nilashan
  • 690
  • 1
  • 8
  • 30

3 Answers3

4

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

  1. You need to supply the focal length of the camera (ie 28mm)
  2. the digital multiplier factor based on how close the lens is to the sensor and how big the sensor is (ie: 1.6x)
  3. and last you need to know the aperture setting at the time the photo was taken...(ie f2.8)

You should be able to come up with an estimated distance using these. It won't be 100% accurate.

Good Lux
  • 896
  • 9
  • 19
2

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

Community
  • 1
  • 1
Stephen Tetreault
  • 769
  • 1
  • 8
  • 26
1

Only if you know object's length and the angle of camera lens.

volk
  • 63
  • 5