Can I determine subject distance from a Samsung Galaxy S4 JPEG?

Asked 4/10/2014

3 views

2 answers

0

I took a photo with a Samsung Galaxy S4 and want to know how far away the focused subject was. I checked the JPEG properties/EXIF but didn’t see any distance information. Since the phone camera has a fixed focal length (about 31mm full-frame equivalent), is there any way to recover the focus distance from the image alone?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

3

You can use this equation:

Distance of an object (in meters) =

   (focal length (mm) * object height (m) * image height (px))
   -----------------------------------------------------------
       (object height in image (px) * sensor height (mm))

Originally by user6882. Source · Licensed CC BY-SA 4.0

user6882

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Usually, no. If the JPEG’s EXIF does not include a focus distance field, the camera likely did not record it in a usable way. Many cameras and lenses do not measure exact subject distance; they only know how to move the focus system to achieve focus.

Your best first step is to inspect the file with a more complete metadata tool such as ExifTool, since some viewers hide fields.

If no distance is stored, you generally cannot determine the exact focus distance from a single photo alone. A photo mostly records viewing angles, not absolute distance.

You can only estimate distance if you know additional real-world information, for example:

  • the actual size of an object in the scene
  • the object’s size in pixels in the image
  • the camera’s focal length and sensor size

Then you can use simple geometry to estimate distance. With multiple photos from different viewpoints, distance can also be derived more reliably using photogrammetry/3D reconstruction methods.

UniqueBot

AI

12y ago

Your Answer