KNN Matting

Qifeng Chen, Dingzeyu Li, Chi-Keung Tang

CVPR 2012 / TPAMI 2013

We are interested in a general alpha matting approach for the simultaneous extraction of multiple image layers; each layer may have disjoint segments for material matting not limited to foreground mattes typical of natural image matting. The estimated alphas also satisfy the summation constraint. Our approach does not assume the local color-line model, does not need sophisticated sampling strategies, and generalizes well to any color or feature space in any dimensions. Our matting technique, aptly called KNN matting, capitalizes on the nonlocal principle by using K nearest neighbors (KNN) in matching nonlocal neighborhoods, and contributes a simple and fast algorithm giving competitive results with sparse user markups. KNN matting has a closed-form solution that can leverage on the preconditioned conjugate gradient method to produce an efficient implementation. Experimental evaluation on benchmark datasets indicates that our matting results are comparable to or of higher quality than state of the art methods.

Paper: CVPR Version / TPAMI Version / Supplemental Material
Source Code on Github

The research was supported by the Google Faculty Award and the Hong Kong Research Grant Council under grant no 619711.
bibtex citation
   author={Qifeng Chen and Dingzeyu Li and Chi-Keung Tang},
   journal={Pattern Analysis and Machine Intelligence, IEEE Transactions on},
   title={KNN matting},