此存储库已移动
删除图像的背景
输入图像
输入遮罩
提取前景
简单的例子
from matting import alpha_matting , load_image , save_image , estimate_foreground_background , stack_images
image = load_image ( "plant_image.jpg" , "RGB" )
trimap = load_image ( "plant_trimap.png" , "GRAY" )
alpha = alpha_matting ( image , trimap , method = "cf" , preconditioner = "vcycle" , print_info = True )
foreground , background = estimate_foreground_bac
2021-03-17 15:11:54
1.23MB
Python
1