Cheap depth camera with a small footprint to use with Arduino or Raspberry Pi

You want to use a single camera to determine distance to an object from the camera lens?
I would use two cameras to achieve this, or better yet another sensor specifically meant for measuring distance.