So, for example, we have a photo from real life. how to get (for example, relative to the size of the image) the distance from the wall to the girls, from the girls to the trees, if all that we know from this picture?

(source: vkontakte.ru )
Work with algorithms and / or open source programs doing this will be welcome. For me, code is better than just an algorithm. So if you give algorithms, please provide links to the Open Source software representations of these algorithms!)
So, how to determine how far the object in the photo is from other objects in this photo?
algorithm image detection
Rella
source share