This is the final project of Probabilistic Graphical Models.
In the first part, We try to reduce image noise using a Markov Random Field model. We compared the result with a Naive Bayes model. In the second part, We use MRF to segment an image.
In MRF model, for each pixel we can define some surrounding pixels as its neighbors(Ref). We can use a simulated annealing strategy to optimise final result. The energy function of our MRF model:
We used three different color spaces to achieve the best result. Grayscale, HSV, RGB Format