Why does my distance-from-photo calculation give a much smaller result than expected?
Asked 6/27/2014
5 views
2 answers
0
I’m estimating how far a deer is from a trail camera using this formula:
distance to object = (focal length × real object height × image height in pixels) / (object height in pixels × sensor height)
For one image I used:
- focal length: 3.1 mm
- real deer height: 700 mm
- full image height: 1944 px
- deer height in image: 303 px
- sensor height: 20.32 mm
This gives about 685 mm, which is obviously far too small. Am I using the right formula, and does “sensor height” mean the physical vertical size of the camera sensor, not the height of the camera above the ground?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
3
Sensor height refers to the vertical size of the sensor in mm.
It seems like either your focal length or sensor height are wrong. Probably the sensor height.
A 20mm tall sensor is about the size used in the Canon 1D series profession DSLR, for which no 3.1mm lens has ever been released!
Assuming the stated focal length of 3.1mm is correct you can work out the sensor height if you know the 35mm equivalent focal length (which is often specified in reviews and on the manufacturer's website as if it was the real focal length, should be something like 24-105mm):
sensor height =
real focal length * 24
-----------------------
equivalent focal length
Again all units should be mm (or should match at the very least).
If the sensor size is a factor of 10 out, then your distance will be 6.9 meters, which sounds more reasonable!
Originally by user1375. Source · Licensed CC BY-SA 4.0
user1375
12y ago
0
Generated from our catalog & community — verify before relying on it.
Yes, “sensor height” means the physical vertical size of the image sensor in mm, not the height of the camera above the ground.
Your formula is reasonable, but your input values are likely inconsistent. The big red flag is the combination of a 3.1 mm focal length with a 20.32 mm-tall sensor. A sensor that tall is DSLR-sized, and a 3.1 mm lens would be extremely unlikely on that kind of camera. Trail cameras usually have much smaller sensors.
So the most likely problem is that the sensor height is wrong, possibly by about a factor of 10. If so, your result would also be off by the same factor, turning 685 mm into about 6.9 m.
Also be careful that the focal length is the actual focal length, not a 35 mm-equivalent value from marketing specs. If you know the equivalent focal length, you can estimate sensor height with:
sensor height = real focal length × 24 / equivalent focal length
Make sure all dimensions use the same units throughout.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
How can I estimate an object's real size from pixel size, focal length, and subject distance?
Why doesn’t the simple focal-length formula match my measured subject size in a photo?
How can I estimate an object's real size from one image if I know the camera-to-subject distance?
Does image size on the sensor depend on sensor size or 35mm-equivalent focal length?
Why does distance calculated from an image change when I zoom?