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
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.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
Can I estimate subject distance in an old photo without knowing the lens or camera distance?
Can you tell what distance your camera has autofocus set to?
How can I tell which of two JPEGs is closest to the original and preserves the most detail?
Can severe camera-shake blur be fixed after a photo is taken?
Can you calculate subject distance from two photos taken a few centimeters apart?