Guided Filter

Version (2.54 KB) by Rachel
An 2D edge-preserving filter derived from a local linear model. Related to bilateral filter.
Updated 6 Oct 2011

View License

This is a novel type of explicit image filter - guided filter. Derived from a local linear model, the guided filter
generates the filtering output by considering the content of a guidance
image, which can be the input image itself or another different image.

The guided filter can perform as an edge-preserving smoothing operator
like the popular bilateral filter, but has better behavior near the edges. It also has a theoretical connection with the matting Laplacian matrix, so is a more generic concept than a smoothing operator and can better utilize the structures in the guidance image. Moreover, the
guided filter has a fast and on-approximate linear-time algorithm, whose
computational complexity is independent of the filtering kernel size. The guided filter is both effective and efficient in a great variety of computer vision and computer graphics applications including
noise reduction, detail smoothing/enhancement, HDR compression, image matting/feathering, haze removal, and joint upsampling.

There are two files: 'guided_filter.m' contains the guided filter function; 'guided.m' is an example script demonstrating the use of the filter.

Cite As

Rachel (2024). Guided Filter (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes