Python implementation of Bayesian Matting from Yung-Yu Chuang, Brian Curless, David H. Salesin, and Richard Szeliski. A Bayesian Approach to Digital Matting. In Proceedings of IEEE Computer Vision and Pattern Recognition (CVPR 2001), Vol. II, 264-271, December 2001
I think there is a wrong type in the example available here: https://github.com/MarcoForte/bayesian-matting/blob/master/bayesian_matting.py#L192
Should not this be just: