Humans view the world in three dimensions using their two eyes. Robots can do the same when they are equipped with two cameras; this is called stereo vision. A stereo rig is a pair of cameras mounted on a device, looking at the same scene and separated by a fixed baseline (that is, the distance between the two cameras). This recipe will demonstrate how a depth map can be computed from two stereo images by computing the depth correspondence between the two views.
Computing depth from a stereo image
Getting ready
A stereo vision system is generally made of two side-by-side cameras looking toward the same direction. The following diagram illustrates such a stereo system in a perfectly-aligned configuration:
Under this ideal...