1. One or more computer-readable media comprising computer-executable instructions for occlusion handling in stereo imaging, the computer-executable instructions comprising instructions for: setting an initial estimate of a disparity and occlusions between first and second stereo images; forming patches in one of the stereo images, wherein the patches are formed using a relationship between an occlusion in the first stereo image and a discontinuity in the second stereo image; optimize energy within an alpha-expansion move based on a current solution indicated by disparities and occlusions of the patches formed; and obtaining disparities and occlusions of pixels in the stereo images from the disparities and the occlusions of the patches resulting from the energy optimization.