Simple video matting by using Bayesian Estimation and Knn Matting.
This is a simple video matting code. It is useful if the foreground and background color distribution is not going to change much.
Related link:
http://www.roman10.net/real-time-video-bilayer-segmentationtheorypart-1-bayesian-estimation/
http://dingzeyu.li/projects/knn/
Code for bayesian estimation is authored by Jun Luan