www.gusucode.com > images 案例代码 matlab源码程序 > images/PerformEdgePreservingSmoothingUsingGuidedFilteringExample.m

    %% 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.

% Copyright 2015 The MathWorks, Inc.

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.
imshowpair(A,Ismooth,'montage');