# Distances In a Single Image With Some Real References

Consider following image:

We have some real references here: Stonehenge measurements (stone dimensions and distances), some strait lines at the back of carts, cart wheels that are almost of the same size for both carts. At the same time we don't know the specification of the camera lens. Question: Is it possible to calculate distance of the cart from stones? Or can we even deduce that the cart belongs to the scene or not?

## 1 Answer

Well, you can have an approximation. Due to the forms in the image are non regular, completely plain, its hard if not impossible to know the camera distortion. But if you know the size of the wheels and also you have the measures of the stones you can approximate the distance of the cart to the stones by using this equation:

$$D_w = \frac{S_w * f}{P_w},$$

where: $D_w$ is the distance from the camera to the wheel, $S_w$ is the real height of the wheel, $f$ is the distance of the focal to the film when the film is in the camera (You need to search for this parameter to use this approach, also you need to know the proportion of the real impressed picture with the film) and $P_w$ is the height of the wheel in the film. The same thing for the stone:

$$D_r = \frac{S_r * f}{P_r},$$

where: $D_r$ is the distance from the camera to the stone, $S_r$ is the real height of the stone and $P_r$ is the height of the stone in the film. Finally the distance $D_t$ from the wheel to the stone is:

$$D_t= D_r -D_w$$

I recomend you to use the objects that are marked in red in the next image, because are the nearest to the epipolar line.

Hope this could help, Best.

• Thanks. Concise answer. I wonder if you could elaborate on the case that we don't know the focal distance and porportion of the real impressed picture as mentioned in OP. – Bahribayli Jul 15 '15 at 17:42
• Well it can be performed, but in this case I'd rather use the road to try to get how far are the first cart trying to obtain some vanishing point from the shores of the road and assuming that the dimensions of the cart are known try to approximate the distances using these parameters. But I need to emphasize that the approximation could be pretty inaccurate – Alexander Leon VI Jul 15 '15 at 18:37
• What do you think about using two wheels of the front cart which are coplanar circles with the method proposed in: ieeexplore.ieee.org/xpl/… – Bahribayli Jul 16 '15 at 4:12
• Focal length can be calculated using two wheels of the front cart using this method: wakayama-u.ac.jp/~wuhy/Eccv2004Final.pdf – Bahribayli Jul 16 '15 at 19:32
• Wow! this approach is very fascinating, I really wanted to try to answer this question, now I think I've learned a lot of things. Thanks for share your knowledge! – Alexander Leon VI Jul 16 '15 at 21:24