Coder Social home page Coder Social logo

dingzeyuli / knn-matting Goto Github PK

View Code? Open in Web Editor NEW
150.0 13.0 40.0 11 KB

Source Code for KNN Matting, CVPR 2012 / TPAMI 2013. MATLAB code ready to run. Simple and robust implementation under 40 lines.

Home Page: http://dingzeyu.li/projects/knn/

License: Mozilla Public License 2.0

Shell 5.82% MATLAB 68.04% M 26.14%
knn nearest-neighbor-search matting vision segmentation foreground knn-matting vlfeat

knn-matting's Introduction

Qifeng Chen, Dingzeyu Li, Chi-Keung Tang
The Hong Kong University of Science and Technology
CVPR 2012 / TPAMI 2013

KNN Matting

Installation Steps

Linux and Mac

run "bash install.sh" to download all the required libraries and data. It would take several minutes to tens of minutes, depending on the network connection.

Windows or Manual Installation

  • Download the VLFeat library and extract into the same directory.
  • Download the training dataset from AlphaMatting.com .
  • Extract corresponding files into ${KNN_MATTING_DIR}/vlfeat/ and ${KNN_MATTING_DIR}/data/, for details please see the ${KNN_MATTING_DIR}/src/run_demo.m.

Optional Data

  • SVBRDF data from Jason Lawence, the inverse shaded tree database.

Running the Demo

We have been running our codes since Matlab R2011b. The latest version of code is tested on Matlab R2015a. Please let us know if you run into problem.

The input method 1.Left click on each layer (Press Space to seperate layers) 2.press Enter to terminate

Parameters to change are input at the begining of the code lambda: see equ(12) level: the degree of spatial coherence. normally between 0.5 and 3 factor: the degree of hue. normally between 0.5 and 3 im: an image or BRDF data scrib: scribble l: input windows size is (l*2+1)^2 nn: the number of neighbors. It can be a vector of two elements. For example [10;2] means 10 neighbors with default(level) spatial coherence and 2 neighbors with weak spatial coherence.

Note: Scribble inputs in RGB space usually perform better than HSV space.

More Information

For more information, please go to our project site for the detailed paper.

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

Qifeng Chen ([email protected]) and Dingzeyu Li ([email protected])

knn-matting's People

Contributors

dingzeyuli 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

knn-matting's Issues

Run demo.m error

When I run demo.m on Matlab R2018a, meeting the error ,it prompt needing 'VCOMP100.DLL', but dont't have the file in vlfeat-0.9.20\toolbox\mex\mexw64
Can you help me solve this problem?
image

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.