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

I would use one of these
Kinect Sensor

But don't get it from the link. These are available at a stupidly low price at any "cash converters" or other second hand computer shops. Less than £10 in most cases.