MRF 2.2, http://vision.middlebury.edu/MRF/code/