Add markov chain for contour prediction