A Hierarchical Markov Random Field Model for Figure-Ground Segregation