Giter Club home page Giter Club logo

affinitybasedmattingtoolbox's Introduction

Affinity-Based Matting Toolbox

About

This toolbox includes a collection of common affinity-based image matting algorithms as well as matte refinement algorithms used by sampling-based image matting methods. It features the only public (re-)implementation of information-flow matting [AAP17], a faster matting Laplacian [LLW08] computation and a faster trimap trimming [SRPC13]. The parameters for each algorithm are easily customizable.

The included matting algorithms are:

  • Information-flow matting [AAP17]
  • KNN matting [CLT13]
  • Closed-form matting [LLW08]

The included matte refinement algorithms are:

  • Information-flow matte refinement [AAP17]
  • Shared matting matte refinement [GO10]

The included trimap trimming methods are:

  • Patch-based trimming [AAP17]
  • Trimming from known-unknown edges [SRPC13]

The toolbox is designed to be ease of use for an extended set of applications. Sparse affinity matrices defined and used in [AAP17, CLT13, CZZT12, LLW08] can be obtained by calling the corresponding functions inside 'affinity' directory. The functions in this directory allow defining regions for neighborhood search.

An example image-trimap pair from the alpha matting benchmark [RRW09] is provided. Basic features are demonstrated in the demo file. Each function features an explanation and definitions of related parameters.

The information-flow matting function in this toolbox is not the original implementation used in the paper. These are reimplementations of the original methods and may not give the exact same results as reported in the corresponding papers.

Planned extensions

I plan to add the layer color estimation methods, as well as LNSP matting and multiple-layer matte estimation methods in the near future. I may tweak the information-flow matting implementation to achieve its original performance on the benchmark. Feel free to contribute or propose a method to be added to the toolbox by contacting me.

License and citing the toolbox

This toolbox is provided for academic use only. If you use this toolbox for an academic publication, please cite corresponding publications referenced in the description of each function, as well as this toolbox itself:

@MISC{abmt,
author={Ya\u{g}\{i}z Aksoy},
title={Affinity-based matting toolbox},
year={2017},
howpublished = {\url{https://github.com/yaksoy/AffinityBasedMattingToolbox}},
}

References

[AAP17] Yagiz Aksoy, Tunc Ozan Aydin, Marc Pollefeys, "Designing Effective Inter-Pixel Information Flow for Natural Image Matting", CVPR, 2017. [link]

[CLT13] Qifeng Chen, Dingzeyu Li, Chi-Keung Tang, "KNN Matting", IEEE TPAMI, 2013. [link]

[CZZT12] Xiaowu Chen, Dongqing Zou, Qinping Zhao, Ping Tan, "Manifold preserving edit propagation", ACM TOG, 2012 [paper]

[GO10] Eduardo S. L. Gastal, Manuel M. Oliveira, "Shared Sampling for Real-Time Alpha Matting", Computer Graphics Forum, 2010. [link]

[LLW08] Anat Levin, Dani Lischinski, Yair Weiss, "A Closed Form Solution to Natural Image Matting", IEEE TPAMI, 2008. [paper]

[RRW09] Christoph Rhemann, Carsten Rother, Jue Wang, Margrit Gelautz, Pushmeet Kohli, Pamela Rott, "A Perceptually Motivated Online Benchmark for Image Matting", CVPR 2009. [link]

[SRPC13] Ehsan Shahrian, Deepu Rajan, Brian Price, Scott Cohen, "Improving Image Matting using Comprehensive Sampling Sets", CVPR 2013 [paper]

affinitybasedmattingtoolbox's People

Contributors

yaksoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

affinitybasedmattingtoolbox's Issues

Results are not good as yours on alphamatting.com

Hi Professor Aksoy!
I am very interested in your research and thank you for your code.
I have a problem now.
Whether I use 'mattePostTrim' or not, the results of the test run on alphamatting.com are not as good as yours. Why is that?

Having trouble getting the results from informationFlowMatting()

Hi yaksoy,

Thank you for providing the matlab code for your interesting paper on information flow matting. However, I am not able to get the results from informationFlowMatting() function, the returned a_ifm contains nothing but zeros. The closedFormMatting() however seems to run fine without any problem. I've tried to trace the problems and found out that calculated Lap sparse matrix contains all zeros before pcg, but not sure how to solve it. I've ran the program with sample images provided in the code, with matlab 2015. Thank you for the help :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.