Building on WildCrustceanWildCrustcean's response another possiblity would be stereo vision. While we often think of stereo vision as using two cameras the techniques really only need images displaced in space and a model of the displacement. In other words I can take an image, move, then take another image. So long as I know the transformation between these two images I can then use stereo vision techniques to calculate the distance to a point in the image.