本文参考了:http://blog.leanote.com/post/[email protected]/Image-Matting。作者给出了大部分matting-code的链接,说明也比较细致、系统,在这里向作者表示由衷地感谢!以下是博客的原文:
肖总博客:http://39.108.216.13:8090/display/~xiaozhenzhong/Image-Matting+and+Background+Blur
paper: A Bayesian Approach to Digital Matting. CVPR, 2001.
细节讨论:http://blog.csdn.net/baimafujinji/article/details/72863106?locationNum=2&fps=1 (MATLAB)
作者主页: http://grail.cs.washington.edu/projects/digital-matting/image-matting/
python版本: https://github.com/MarcoForte/bayesian-matting (python 3.5+)
paper:J Sun, J Jia, C Tang, Y Shum. 2004. Poisson matting. ACM Trans. Graph. 23, 3 (August 2004), 315-321. DOI
GitHub : https://github.com/MarcoForte/poisson-matting (python 3.5 or 2.7, windows)
依赖库: scipy,numpy,matplotlib,opencv,numba,pillow; 执行 python poisson_matting.py ,每张图片时间:0.58s
paper: A closed form solution and pattern recognition(2006-cvpr)
细节讨论:https://blog.csdn.net/On_theway10/article/details/79014023
作者主页: http://webee.technion.ac.il/people/anat.levin/ code:matlab;
python版本: https://github.com/MarcoForte/closed-form-matting
c++版本: https://github.com/Rnandani/Natural-image-matting
paper:J. Wang and M. Cohen. Optimized color sampling for robust matting. CVPR, 2007
GitHub : https://github.com/wangchuan/RobustMatting (opencv3.2 eigen vs2015) (2017)
操作流程:下载源码,建立工程,将Eigen下所需的库添加到资源文件,release下生成.exe文件;
执行Robust_Matting.exe GT04-image.png GT04-trimap.png troll_alpha.png 每张图片运行时间 58s
运行测试图片0103.png图片等,平均时间约为3s
paper : Shared Sampling for Real-Time Alpha Matting;(2010-Eurographics)
原文代码: http://inf.ufrgs.br/~eslgastal/SharedMatting/
编译环境 : ( CUDA 3.2+LINUX 64BIT+GPU CAPABILITY >1.0 +QT VERSION4 +BOOST 1.4)在linux下执行已经编好的可执行程序, matlab用于对结果进行优化;(作者直接提供了一个可执行程序,貌似不可修改)
进入文件夹,直接执行:
./SharedMatting -i GT04.png -t GT04_trimap.png -g GT04_gt.png -b moon.jpg (实时)(optimization takes almost 9 seconds)
或执行:
./SharedMatting 手动选择输入图片input image he trimap;
执行: time ./SharedMatting -i GT04.png -t GT04_trimap.png -a GT04_ALPHA.png ----real: 0.174s
源代码修改后的c++版本:https://github.com/np-csu/AlphaMatting (原文的c++ +opencv版本)
paper : He, Kaiming, et al. "A global sampling method for alpha matting." In CVPR’11
工程链接:https://github.com/atilimcetin/global-matting (c++)
guided filter ,debug模式下,1501s ; release模式测试640*480的人物测试图片每张约700ms
paper: KNN Matting(2012-cvpr)
https://github.com/dingzeyuli/knn-matting (linux, matlab) (CVPR2012)
linux下直接运行install.sh, 下载相关依赖库,完成后直接运行run_demo.m , 测试图片GT04.png (800*563) time <5s
(matlab 2016b) (运行测试0103.png图片等,平均时间约为2.4s)
paper:Ning Xu, Brian Price, Scott Cohen, Thomas Huang. Deep Image Matting.2017
GitHub:https://github.com/Joker316701882/Deep-Image-Matting (python tensorflow implementation)
gSLICr: real-time super-pixel segmentation:https://github.com/carlren/gSLICr (c++ ubuntu 14.04; win8 visual studio )(2015)
mishima-matting: https://github.com/MarcoForte/mishima-matting (python3.5,) (2017)
依赖库:scipy, numpy,matplot, 执行 python mishima_matting.py,Runtime for an image 82.46864613339243
auto-portrait-matting: https://github.com/aromazyl/auto-portrait-matting (hog+svm+grabcut 算法自动trimap生成, linux)
Automatic Portrait Segmentation for Image Stylization
paper: Automatic portrait segmentaion for image stylization, cvpr 2016; (caffe,matlab, matio1.5.11 )
paper & code : http://xiaoyongshen.me/webpage_portrait/index.html (paper and code)