Online, self-supervised terrain classification via discriminatively trained submodular Markov random fields