If you have two images of the same subject from two vantage points you can calculate roughly the depth of the image. In this case it's slightly different since once of the "cameras" is actually a projector. So one viewpoint has a "perfect" image since it has the pattern hardcoded into its frame. You just need a camera then to record the projected image and extract a disparity map between the two. From that you can determine depth.