Coder Social home page Coder Social logo

guidedfilter's Introduction

Guided Imaged Filtering Demo (Python)

Simple python demos of Guided Image Filtering [He et al. 2010].

The guided filter can perform edge-preserving smoothing filtering like the popular bilateral filter.

In this demo package, I also implemented Fast Guided Filter [He et al. 2015].

Result

Simple guided filter test for noise image:

  1. Noise image from original image.
  2. Guided filter smooth the noise image like bilateral filter.
    • Guidance image: Noise image.
    • Epsilon (regularization term similar to the sigma in the color space): Constant 0.05.
    • Radius (similar to the sigma in the coordinate space): [5, 10, 20]

flower_1

Performance

Compare the performance of the following filters:

  • Bilateral filter: OpenCV implementation.
  • Guided filter [He et al. 2010]: Implemented in this package.
  • Fast guided filter [He et al. 2015]: Implemented in this package.

performance

Compared with the bilateral filter, guided filters are independent of filtering sigma for coordinates. Fast guided filter leads to a speed up of 4x in this implementation.

Installation

Note: This program was only tested on Windows with Python2.7. Linux and Mac OS are not officially supported, but the following instructions might be helpful for installing on those environments.

Dependencies

Please install the following required python modules.

  • NumPy
  • SciPy
  • matplotlib
  • OpenCV

As these modules are heavily dependent on NumPy modules, please install appropriate packages for your development environment (Python versions, 32-bit or 64-bit). For 64-bit Windows, you can download the binaries from Unofficial Windows Binaries for Python Extension Packages.

Install main modules

You can use pip command for installing main modules. Please run the following command from the shell.

  > pip install git+https://github.com/tody411/GuidedFilter.git

Usage

Package Structure

  • guided_filter: Main package.
    • main.py: Main module for testing.
    • results: Result images will be saved in the directory.

Test Guided Filter Demo

You can test the Guided Filter with the following command from guided_filter directory..

  > python main.py

This command will start downloading test images via Google Image API then run the guided_filter module to generate result images.

License

The MIT License 2015 (c) tody

guidedfilter's People

Contributors

tody411 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

guidedfilter's Issues

Why is radius expanded?

Hi,

I'm not sure why the radius is expanded in both GuidedFilterColor & GuidedFilterGray:
self._radius = 2 * radius + 1

It should just be radius

api

google api 已经不能访问了

GuidedFilterGray bug

Hi,

You have a bug in your code:
in class GuidedFilterGray on line 167 when you calculate
p_cov = p_mean - self._I_mean * p_mean

it should not be p_mean but should be pi_mean
where pi_mean should be the blur of I*p and not what you currently have which is the blur of p

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.