The Raspberry Pi Foundation has posted a lovely explanation of a project carried out by Argon Design. They were given a Compute Module and development board and hooked up two camera modules to it. They then wrote an algorithm to detect depth using the stereo vision two cameras gave them. Read more about it here.