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].
- Noise image from original image.
- 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]
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.
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.
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.
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.
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
- guided_filter: Main package.
- main.py: Main module for testing.
- results: Result images will be saved in the directory.
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.
The MIT License 2015 (c) tody