Ieee transactions on pattern analysis and machine intelligence 35 9 2175 2188 2013. Source code for knn matting cvpr 2012 tpami 2013. It is intentionally kept very simple so it can provide a starting point for new projects.