Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Guided filtering of images

`B = imguidedfilter(A,G)`

`B = imguidedfilter(A)`

`B = imguidedfilter(__,Name,Value,...)`

filters
the image `B`

= imguidedfilter(__,`Name,Value`

,...)`A`

using name-value pairs to control
aspects of guided filtering. Parameter names can be abbreviated.

The parameter

`DegreeOfSmoothing`

specifies a soft threshold on variance for the given neighborhood. If a pixel's neighborhood has variance much lower than the threshold, it will see some amount of smoothing. If a pixel's neighborhood has variance much higher than the threshold it will have little to no smoothing.Input images

`A`

and`G`

can be of different classes. If either`A`

or`G`

is of class integer or logical,`imguidedfilter`

converts them to floating-point precision for internal computation.Input images

`A`

and`G`

can have different number of channels.If

`A`

is an`RGB`

image and`G`

is a grayscale or binary image,`imguidedfilter`

uses`G`

for guidance for all the channels of`A`

independently.If both

`A`

and`G`

are RGB images,`imguidedfilter`

uses each channel of`G`

for guidance for the corresponding channel of`A`

, i.e. plane-by-plane behavior.If

`A`

is a grayscale or binary image and`G`

is an RGB image,`imguidedfilter`

uses all the three channels of`G`

for guidance (color statistics) for filtering`A`

.

[1] Kaiming He, Jian Sun, Xiaoou Tang, *Guided
Image Filtering*. IEEE Transactions on Pattern Analysis
and Machine Intelligence, Volume 35, Issue 6, pp. 1397-1409, June
2013

Was this topic helpful?