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

    %% Compute Mean Filter Over Specified Neighborhood
% 
%%
% Read image into the workspace.

% Copyright 2015 The MathWorks, Inc.

A = imread('cameraman.tif');
%%
% Perform the mean filtering using an 11-by-11 filter.
localMean = imboxfilt(A,11);
%%
% Display the original image and the filtered image, side-by-side.
imshowpair(A,localMean,'montage')