Code for probabilistic image fusion given object contour