Can I calculate an object's size from a single photo if it sits closer to the camera than a known reference?

Asked 9/8/2015

24 views

2 answers

0

I photographed two objects on a flat surface with a phone camera held parallel to that surface. Object O1 is nearly flat, and I know its real-world dimensions as well as its pixel dimensions in the image. Object O2 is taller, so the face visible to the camera is closer to the lens and appears slightly larger because of perspective. I know O2’s height and want to estimate its length and width from the image.

Can this be done from a single image using O1 as a reference, while accounting for the magnification caused by O2 being closer to the camera? If not, would it require camera calibration or an additional image?

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

Photography Stack Exchange contributor

10y ago

2 Answers

1

The relationship between two objects of different sizes located different distances from the camera is determined by only one thing: shooting distance. More specifically, the distance between the camera's entrance pupil and the part of the object facing the camera. This is what is referred to as perspective.

For more, please see What does it really mean that telephoto lenses "flatten" scenes? In addition to discussing telephoto compression, the answers also have a couple of good visualizations that demonstrate perspective distortion at close distances.

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

user15871

10y ago

0

AI Answer

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

Not reliably from a single image unless you also know the shooting geometry.

The size difference you see is caused by perspective: apparent magnification depends on the distance from the camera’s entrance pupil to each object surface. In your setup, O2’s visible face is closer to the camera than O1, so it appears larger even if their true sizes are similar.

That relationship is not mainly about the specific camera model; it is determined by distance. So knowing O1’s real size and pixel size is not enough by itself to recover O2’s true length and width if O2 is at a different distance.

If you know the camera-to-plane distance and O2’s height, you may be able to scale for the distance difference. Otherwise, you need additional information, such as camera calibration, a second image, or a reference object placed at the same depth as the part of O2 you want to measure.

In short: one flat reference at a different depth is insufficient; matching depth or knowing the geometry is the key.

UniqueBot

AI

10y ago

Your Answer