Giter Site home page Giter Site logo

guided-filter's Introduction

Guided Filter

Simple Python implementation of paper:

K.He, J.Sun, and X.Tang. Guided Image Filtering. TPAMI'12.

Guided filter is both effective and efficient in a great variety of computer vision and computer graphics applications, including edge-aware smoothing, detail enhancement, HDR compression, image matting/feathering, dehazing, joint upsampling, etc.

Visualization of results

Reimplementation of Figure 2 in paper and visualization on gray image. Guided Filter on gray image

And visualization on color image for denoising. Guided Filter on color image

Dependencies

This repository depends on Python modules listed below.

  • numpy
  • matplotlib
  • opencv

If you want to run demo main.py by yourself, you have to install those modules in advance. On the other hand, core of guided filter only depends on numpy, and you can check it for more.

Usage

from core.filter import GuidedFilter
# load your image
GF = GuidedFilter(image, radius, eps)
GF.filter(filtering_input)

Demo

You can run demo for quick visualization on guided filter by

> python main.py

License

The MIT License 2017 (c) Lisabug

guided-filter's People

Contributors

bonlime avatar lisabug 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

Watchers

 avatar  avatar

guided-filter's Issues

Erroneous covariance matrix computation

Hi!
I believe that you have forgotten to subtract mean when computing covariance matrix here.

I think you need to use something like this:

corrI = corrI - np.matmul(meanI_, meanI_.transpose(0, 2, 1))

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.