B = imguidedfilter(A,G) filters binary, grayscale, or RGB image A using the guided filter, where the filtering process is guided by imageG.G can be a binary, grayscale or RGB image and must have the same number of rows and columns asA.
B = imguidedfilter(A) filters input image A under self-guidance, using A itself as the guidance image. This can be used for edge-preserving smoothing of imageA.
B = imguidedfilter(__,Name,Value,...) filters the image A using name-value pairs to control aspects of guided filtering. Parameter names can be abbreviated.
Examples
Perform Edge-Preserving Smoothing Using Guided Filtering
This example shows how to perform edge-preserving smoothing using a guide filter.
Read an image into the workspace.
A = imread('pout.tif');
Smooth the image using imguidefilter. In this syntax, imguidedfilter uses the image itself as the guidance image.
Ismooth = imguidedfilter(A);
Display the original image and the smoothed image side-by-side.