>> orgImg=imread('cameraman.tif');
>> imgNoisy=imnoise(orgImg, 'salt & pepper');
>> filter_1=imfilter(imgNoisy,fspecial('average'));
>> filter_2=medfilt2(imgNoisy);
>> subplot(1,3,1), imshow(orgImg), title('Original Image');
>> subplot(1,3,2), imshow(filter_1), title('Average Filter');