WOLFRAM

GuidedFilter[image,guide,r,ϵ]

filters image using the guide image guide over range-r neighborhoods with pixel-value regularizer ϵ.

GuidedFilter[image,r,ϵ]

filters image so as to reduce noise, using image as the guide.

Details and Options

  • GuidedFilter is a nonlinear local filter used for edge-preserving smoothing and structure transfer.
  • GuidedFilter works with arbitrary 2D and 3D images, as well as numeric data arrays of any rank.
  • GuidedFilter[image,r,ϵ] is equivalent to GuidedFilter[image,image,r,ϵ].
  • The images image and guide need to have the same dimensions, but may have a different number of channels.
  • The radius r controls the scale over which the filter operates. Features smaller than r will typically be averaged out, and features larger than r will remain.
  • Larger values of ϵ result in more smoothing and less guidance, while smaller values of ϵ result in less smoothing and more guidance.
  • At the edges of the image, smaller neighborhoods are used.
  • If image is a multichannel image, the guidance is always applied to each channel separately.
  • If guide is a multichannel image, operations involving guide are performed using vector processing.
  • GuidedFilter can take an option MaxIterations to specify the maximum number of iterations. By default, one iteration is performed.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Filtering of an image:

Out[18]=18

Filtering of an image using a guide image:

Out[1]=1

Scope  (3)Survey of the scope of standard use cases

Data  (3)

Guided filtering of a noisy 2D array:

Out[3]=3

Reduce noise and visualize:

Out[4]=4

Guided filtering of a color image:

Out[1]=1

Guided filtering of a 3D image:

Out[2]=2

Options  (1)Common values & functionality for each option

MaxIterations  (1)

By default, one iteration of guided filtering is performed:

Out[2]=2

Run more iterations:

Out[3]=3

Applications  (8)Sample problems that can be solved with this function

Smooth an image:

Out[1]=1

Denoise an image:

Out[1]=1

Decompose an image into base and details:

Out[2]=2

Unsharp masking:

Out[1]=1

Refine a blocky estimate of the transmission map of light through haze:

Out[1]=1

Joint upsampling of an operation performed at low resolution:

Tone map a low-resolution image:

Out[2]=2

Guide the upsampled low-resolution result with the high-resolution image:

Out[3]=3

Simple single-image upsampling is blurry:

Out[4]=4

Guided feathering for matting:

Out[2]=2

Use the refined mask with transferred structure as an α matte:

Out[3]=3

Enhance a no-flash image using an aligned-flash image:

Out[2]=2

Properties & Relations  (3)Properties of the function, and connections to other functions

Smoothing is typically stronger with a bigger regularization parameter ϵ:

Out[8]=8

If image and guide are identical, a regularization parameter ϵ set to zero yields an identical output:

Out[1]=1

GuidedFilter and BilateralFilter produce similar results:

Out[1]=1

GuidedFilter does not produce gradient reversal artifacts:

Out[3]=3
Wolfram Research (2015), GuidedFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GuidedFilter.html.
Wolfram Research (2015), GuidedFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GuidedFilter.html.

Text

Wolfram Research (2015), GuidedFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GuidedFilter.html.

Wolfram Research (2015), GuidedFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GuidedFilter.html.

CMS

Wolfram Language. 2015. "GuidedFilter." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GuidedFilter.html.

Wolfram Language. 2015. "GuidedFilter." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GuidedFilter.html.

APA

Wolfram Language. (2015). GuidedFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GuidedFilter.html

Wolfram Language. (2015). GuidedFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GuidedFilter.html

BibTeX

@misc{reference.wolfram_2025_guidedfilter, author="Wolfram Research", title="{GuidedFilter}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GuidedFilter.html}", note=[Accessed: 08-July-2025 ]}

@misc{reference.wolfram_2025_guidedfilter, author="Wolfram Research", title="{GuidedFilter}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GuidedFilter.html}", note=[Accessed: 08-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_guidedfilter, organization={Wolfram Research}, title={GuidedFilter}, year={2015}, url={https://reference.wolfram.com/language/ref/GuidedFilter.html}, note=[Accessed: 08-July-2025 ]}

@online{reference.wolfram_2025_guidedfilter, organization={Wolfram Research}, title={GuidedFilter}, year={2015}, url={https://reference.wolfram.com/language/ref/GuidedFilter.html}, note=[Accessed: 08-July-2025 ]}