GuidedFilter
✖
GuidedFilter
filters image using the guide image guide over range-r neighborhoods with pixel-value regularizer ϵ.
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 allBasic Examples (2)Summary of the most common use cases
Scope (3)Survey of the scope of standard use cases
Data (3)
Guided filtering of a noisy 2D array:

https://wolfram.com/xid/0g7i7bn26ei-uhuzus


https://wolfram.com/xid/0g7i7bn26ei-fhm10w

Guided filtering of a color image:

https://wolfram.com/xid/0g7i7bn26ei-n4r0uo

Guided filtering of a 3D image:

https://wolfram.com/xid/0g7i7bn26ei-5207y4

https://wolfram.com/xid/0g7i7bn26ei-x2vulv

Options (1)Common values & functionality for each option
Applications (8)Sample problems that can be solved with this function

https://wolfram.com/xid/0g7i7bn26ei-ba1zd2


https://wolfram.com/xid/0g7i7bn26ei-te181m

Decompose an image into base and details:

https://wolfram.com/xid/0g7i7bn26ei-dy6o4i

https://wolfram.com/xid/0g7i7bn26ei-cdo8ne


https://wolfram.com/xid/0g7i7bn26ei-ceu4oz

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

https://wolfram.com/xid/0g7i7bn26ei-ewtdts

Joint upsampling of an operation performed at low resolution:

https://wolfram.com/xid/0g7i7bn26ei-yxowne
Tone map a low-resolution image:

https://wolfram.com/xid/0g7i7bn26ei-snr7hq

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

https://wolfram.com/xid/0g7i7bn26ei-czv6be

Simple single-image upsampling is blurry:

https://wolfram.com/xid/0g7i7bn26ei-hfdha2

Guided feathering for matting:

https://wolfram.com/xid/0g7i7bn26ei-w7n7sc

https://wolfram.com/xid/0g7i7bn26ei-1e9619

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

https://wolfram.com/xid/0g7i7bn26ei-72v6ub

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

https://wolfram.com/xid/0g7i7bn26ei-6lewkw

https://wolfram.com/xid/0g7i7bn26ei-2vlye2

Properties & Relations (3)Properties of the function, and connections to other functions
Smoothing is typically stronger with a bigger regularization parameter ϵ:

https://wolfram.com/xid/0g7i7bn26ei-md8bnj

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

https://wolfram.com/xid/0g7i7bn26ei-o8hebx

GuidedFilter and BilateralFilter produce similar results:

https://wolfram.com/xid/0g7i7bn26ei-ma3m8s

GuidedFilter does not produce gradient reversal artifacts:

https://wolfram.com/xid/0g7i7bn26ei-wn30oy

https://wolfram.com/xid/0g7i7bn26ei-s28vy

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
]}
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
]}