Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.35 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.35 KB

poisson-matting

Python implementation of poisson matting method described in
Jian Sun, Jiaya Jia, Chi-Keung Tang, and Heung-Yeung Shum. 2004. Poisson matting. ACM Trans. Graph. 23, 3 (August 2004), 315-321. DOI=http://dx.doi.org/10.1145/1015706.1015721 http://www.cs.virginia.edu/~gfx/courses/2006/DataDriven/bib/matting/sun04.pdf

This implementation only covers the global poisson matting part of the paper at present.

Requirements

  • python 3.5 or 2.7
  • scipy
  • numpy
  • matplotlib
  • opencv
  • numba (optional for speed up)

Running the demo

  • '''python poisson_matting.py'''

Results

Original image

Trimap image

Result image

More Information

The jupyter notebook contains more explanation with nice formatting and pretty pictures, also a numpy version of the poisson solve.

Disclaimer

The code is free for academic/research purpose. Use at your own risk and we are not responsible for any loss resulting from this code. Feel free to submit pull request for bug fixes.

Contact

Marco Forte (fortem@tcd.ie)