SVM- and MRF-Based Method for Accurate Classification of Hyperspectral Images
Yuliya Tarabalka, Mathieu Fauvel, Jocelyn Chanussot and Jón Atli Benediktsson
IEEE Geoscience and Remote Sensing Letters, Vol. 7, no. 4, OCTOBER 2010
Year: 2010, Volume: 7, Issue: 4, Pages: 736 – 740
Archive 2.zip contains MRF codes using graph-cut which are much more efficient, also provided by Dr Tarabalka.
More code :
You can find a simplified (python) version of the algorithm here
(without gradiant and with ICM rather than Gibs sampler):