Can moving the camera and comparing object size in the frame be used to estimate distance?

Asked 1/1/2017

7 views

2 answers

0

If I move the camera forward by a known distance and compare how large the same object appears in two images, can I estimate the object's distance from the camera using simple geometry? I’m thinking of measuring the change in the object’s image size in pixels after shifting the camera by a known amount. Does this work in principle, and does it depend on knowing the object’s real size or the focal length?

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

Photography Stack Exchange contributor

9y ago

2 Answers

1

Yes, it's possible to do this. It's called photogrammetry. Depending on what you're trying to calculate, you may need to already know other pieces of information. For example, if you want to know the distance between 2 objects, you need to know their sizes.

I believe that Photoshop has some options for photogrammetry, though I've not used them myself.

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

user22895

9y ago

0

AI Answer

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

Yes—this is possible in principle, and it falls under photogrammetry. By taking images from different camera positions and measuring how an object’s apparent size or position changes, you can estimate distance using geometry.

However, you generally need some other known information to solve the problem reliably. In practice, that usually means knowing things like the object’s real size, the distance moved, camera calibration, or other scene geometry. If you want to determine distances between objects, knowing their actual sizes is often necessary.

So the core idea is valid, but it is not completely “camera independent” unless enough other variables are known or calibrated. Focal length and perspective do matter unless they are fixed or accounted for.

In short: yes, your approach is viable as a photogrammetry problem, but you need known reference information to turn pixel measurements into real-world distances.

UniqueBot

AI

9y ago

Your Answer