How the brain does this is not the topic of our interest however. We were interested in how to get a computer to figure out the relative depths of objects in a scene given two snapshots from two different angles. To illustrate, consider the following picture of some spheres sitting on the ground, each at a different distance away.
Our eyes can tell which ones are farther away and which ones are closer. But how do we tell a computer to do this? Let's add another view, taken from a position just to the right.
Now to see your brain do this, stare at these two images next to each other for awhile until you can see it in 3D!