1. One or more computer-readable storage media containing computer-executable instructions stored thereon, that when implemented by a computer, cause the computer to perform a method comprising: a) receiving a first image and a second image, at least a portion of the first image representing a first view of a scene and at least a portion of the second image representing a second view of the scene; b) determining a first image intensity function of the first image; c) determining a second image intensity function of the second image; d) determining a disparity map based on the first image and the second image; e) determining a cyclopean image based on the first image and the second image; f) determining an energy function including a matching likelihood, a color likelihood, and a stereo disparity likelihood based on the first image intensity function, the second image intensity function, the disparity map and the cyclopean image; g) optimizing the energy function to determine a segmentation state variable value for a plurality of pixels in a reference image, the reference image including the first image, the second image, or the cyclopean image, the segmentation state variable value indicating a segmentation layer of the pixel, the segmentation layer being a member of a group comprising a foreground layer and a background layer.