Given two images of a scene taken from slightly different viewpoints, a stereo image pair, it’s possible to determine the disparity for every pixel using template matching. The disparity image is one where the value of each pixel is inversely related to the distance between that point in the scene and the camera.