It is possible take geometric informatios about objects using camera.
But you need a lot of pictures, and also compute some camera parameters ( like, focal distance ).
This can be achieved by only one camera getting picures on diffrent known positions, or also several static cameras.
This method is called 3D Reconstruction.
Once all that geometry are configurated, the input images will generate a modeled spatial object in witch is possible measure the distance you want.
Take a look here :
**broken link removed**
+++