Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Closed Form Matting

Customized implementation of the closed form matting alogrithm which is proposed by A. Levin。This is an alogrithm for image matting by giving certain constraints, i.e. trimap or scribble.

Usage

for trimap

python main.py --mode=matting --image=/path/to/your_image --trimap=/path/to/your_trimap_image --output_dir=/path/to/output

for scribble

python main.py --mode=matting --image=/path/to/your_image --trimap=/path/to/your_scribble_image --output_dir=/path/to/output

and in order to guide scribble, you may need smallest eigenvector of Laplacian

python main.py --mode=eigen --image=/path/to/your_image --output_dir=/path/to/output

Result

From left to right, [image, trimap/scribble, alpha, matting]

About

The Closed Form Matting Algorithm Implementation

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages