MarcoForte / closed-form-matting

Python implementation of A. Levin D. Lischinski and Y. Weiss. A Closed Form Solution to Natural Image Matting. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), June 2006, New York
MIT License
435 stars 107 forks source link

Why the solution hold the constrains? #17

Closed mayorx closed 5 years ago

mayorx commented 5 years ago

https://github.com/MarcoForte/closed-form-matting/blob/3ea7d8d66bf5a67b26d30a2acb9f1ddcc0ab04e4/closed_form_matting.py#L134-L138

why the solution of (laplacian + confidence)x=prior satisfy the scribbles , and make the cost function minimal? the confidence makes me confusion...

I didn't see the implementation details in the paper. Could you please explain it? Thanks!

MarcoForte commented 5 years ago

Hi, it is in Section 3 of this paper. http://webee.technion.ac.il/people/anat.levin/papers/Matting-Levin-Lischinski-Weiss-PAMI.pdf We use the term confidence since the lambda parameter can be different for each pixel. This is useful when using closed form matting to refine an initial alpha matte obtained from another method that also returns the 'confidence' of it's prediction. Pixels with higher confidence are prioritized during the closed form matting optimization.